Questions tagged as 'c++'

1
answer

Open a file from another directory with C ++ in GNU / Linux

My intention is to select a text file from the text / directory, but when I select it, I get the error. ifstream Archivo; system("clear"); cout << "Elige el archivo que quieres leer" << endl; system("cd texto/ && ls --col...
asked by 13.12.2016 / 05:01
1
answer

___ ___ erkimt help printing binary values of a Huffman algorithm ______ qstntxt ___

I'm making a Huffman tree and I want to show the result of the message on the screen. Something like:

%pre%

But I have problems saving the numbers to print them in order of the message.

%pre%

The problem is that when I save the numbers I can only do it with vector < int & Number and that generates the outputs:

%pre%

When I want to save it in a string or char, so that:

%pre%

    
______ azszpr39118 ___

The problem, as you say, is that you are working with sequences instead of numbers. The digits to the left are significant and that a whole type does not support it. Hence, you can not group each sequence into a single index of the vector %code% .

One solution is to replace %code% so that it happens to store elementso of type %code% :

%pre%

Now, for each letter, we convert the Boolean sequence into a string:

%pre%     
___

I'm making a Huffman tree and I want to show the result of the message on the screen. Something like: Mensaje Original: Hola mundo Huffman: 10010100010101010101 But I have problems saving the numbers to print them in order of the message....
asked by 14.12.2016 / 12:10
1
answer

How to define that the space is already occupied?

I'm doing a project that makes some reservations and I want to ask the user where he wants to be located (ROW / COLUMN). How can I do to say that the position is already occupied if someone previously booked it first? cout<<"\n Escoja...
asked by 01.12.2016 / 15:29
1
answer

C ++ POO The variable is not displayed correctly

I am doing a program of collection and payment of basic services in codeblocks This is my code: #include <iostream> #include <cstdlib> using namespace std; class base { private: //bienvenido char nick[30]; //p...
asked by 02.12.2016 / 19:00
1
answer

How to receive and transmit buffer in C ++

Good morning I am trying to create a proxy for learning purposes, but I have a failure when I want to re-transmit the buffer from the server to the client, here's my function: send(Socket_Server,Reques,strlen(Request),0); int receive = 0; whil...
asked by 01.03.2017 / 18:40
1
answer

How to fix openssl error when including my library

The error he gives me is this:    || === Build: Debug in cheke (compiler: GNU GCC Compiler) === |   main.cpp | 15 | fatal error: openssl / md5.h: No such   file or directory | || === Build failed: 1 error (s), 0 warning (s) (0   minute (s), 0...
asked by 17.11.2016 / 19:19
1
answer

Error without external symbol. c ++

The program code: #include "stdafx.h" #include "MemLoadLibrary.h" #include <iostream> using namespace std; typedef void(_cdecl* func)(); int main(int argc, _TCHAR* argv[]) { CLoad lib; HANDLE hLibrary = lib.LoadFromFile("vana.d...
asked by 13.11.2016 / 14:50
1
answer

Convert a complete project to .dll

How can I convert a complete project in C ++ to a dll, to use in my other projects? I have searched the Internet about how to convert, but the truth is that I never tried everything in c # using the class and importing it into my main program. I...
asked by 15.11.2016 / 02:25
1
answer

Play Sounds in C or C ++ Unused Allegro Library [closed]

How to place sounds in midi , wav format, without the use of the Allegro library in C languages or C ++ ?     
asked by 04.11.2016 / 02:50
1
answer

Show the name of my team with QT

Hello in an application that made it to use it only I want to show the name of my team. It is possible to show the user's name in the following way: QDir::homePath() But what I want is to show the name of my team in my program is it possibl...
asked by 17.10.2016 / 19:25