Questions tagged as 'c++'

1
answer

How to pass a double pointer as an argument and return it from the C ++ function

I have a function that requires it to be void and that a double pointer is returned from it by the argument. void cracking::decompose(char input[][100], int size_S, double* &Atm, int* &ID, int &size_out); { vector<double&...
asked by 12.04.2018 / 19:38
1
answer

Thread - Shared Memory Access Violation

I use a library to retrieve data from an Image (in unsigned char *), and I use it to allocate in an OpenGL Buffer. Because the image can be large, OpenGL by default creates another thread to perform this activity. But I realize free of that i...
asked by 09.03.2018 / 21:10
1
answer

How to define a subclass of an abstract class so that it is concrete

With these classes: class SerVivo { public: virtual void funcA() = 0; virtual void funcB() = 0; }; class Vegetal : public SerVivo{ public: virtual void funcB(){ cout << "funcB em Vegetal \n"; } virtual void funcC() = 0; };...
asked by 20.02.2018 / 13:43
1
answer

Reach problem in C ++

I'm a beginner in C ++ programming and I came across a problem when I tried to run my code in atom , using the gpp-compiler package and MinGW: 'function' was not declared in this scope l.8). I did not understand the reason for the error, can an...
asked by 11.02.2018 / 01:22
1
answer

regex for url validation

I've done this regex to validate URL: const std::regex pattern( "(?:(ftp|http[s]?:[//])?)?([w]{3}[.])?" "(.*[.](com|php|net|org|br|dk|at|us|tv|info|uk|co.uk|biz|se)?)?" "(.*[.](aspx|htm|html|HTM|HTML|jhtm|jhtml|JHTM|JHTML|xhtm|xhtml|X...
asked by 27.12.2017 / 22:45
1
answer

Accents with QString in Qt 5.9 results in bizarre characters

Hi, good afternoon, I'm with a doubt that I can not fix at all the code is as follows .... QTextStream stream( &file ); stream.setCodec("ISO 8859-1"); stream << "<p align=center><font size=4...
asked by 09.12.2017 / 18:15
0
answers

C libarchive error: Unsupported ZIP compression

I'm trying to read a .zip file using libarchive but I'm getting the following error in archive_read_data ()    Unsupported ZIP compression method (deflation) The same error occurs with all other compression formats. follow the code:...
asked by 20.12.2017 / 12:55
0
answers

How to leave a function of an object superimposed on that of another object?

I'm having problems with my code for a D3D9 function, the "Create" function always overlaps, I need another function of the Draw object to overlap with the others. class cDrawItem { private: bool IsInitialized; // Para saber se o objeto fo...
asked by 12.11.2017 / 21:30
0
answers

how to traverse a pointer to set in c ++?

Hello, I'm implementing the Kruskal algorithm, but I can not walk through set< No*>* to test the FIND_SET method, which is a set< No*>* how should I proceed? (in the rest of the code I was running set with foreach...
asked by 13.11.2017 / 16:53
0
answers

Matrix and vector comparison C / C ++ [closed]

I need to compare an op vector entered by the user with the first 10 columns of each row of a 12x12 array. for(k=0; k<10; k++){ for(i=0; i<12; i++){ for(j=0; j<10; j++){ if(op[k]==d[i][j]){ if(i==1)...
asked by 13.12.2017 / 06:44