Questions tagged as 'c++'

1
answer

C ++, execute binary from a byte array

I am trying to use function pointers pointing to a binary stored in byte array, but it always results in segmentation fault. unsigned char byteProg[] = {0x7F,0x45,0x4C,0x46,0x02,0x01,0x01,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x02,.......
asked by 29.07.2017 / 20:34
1
answer

Send a QSerialPort variable to another file

I am currently programming an app in C ++ with IDE Qt but I need to send a QSerialPort variable to another .cpp file in order to have the connection in any screen of the application but it does not accept the variable and I would like to know if...
asked by 21.06.2017 / 00:52
1
answer

Builders of a template

A design pattern not very well known is the PassKey pattern that is used mainly to restrict access to certain public functions (the option would be to use friend in the main classes and that produces too much coupling). A basic implementation...
asked by 23.06.2017 / 11:36
1
answer

Doubt with list of initializers in C ++

I am studying TADs in C++ , and in the section of the constructor I get to the list of inicializadores , it is horribly explained and I have not found a video or page that explains it clearly. What is the list of constructo...
asked by 21.06.2017 / 02:22
1
answer

Read large text files quickly

I have a big problem reading / parsing large text files. The issue is the following are files that have many lines, about 150k lines and I have to read them and then parsed the information. I do it by means of a fread, reading ALL the file and t...
asked by 18.04.2017 / 15:13
1
answer

c ++ builder. Variables static in class [closed]

I have little builder and I try to do an exercise in which values of the position and size of the form are stored in static variables, based on Borland C ++ builder 6 developer's guide pages 86 and 87. For this I pretended create a class in a .h...
asked by 31.03.2017 / 13:51
1
answer

Assign a row from one vector to another in c ++

I'm doing a simple program in c ++. I need to sort a vector by a value in a column that I have in each row. The sorting method is simple, but I can not do the row assignment: void PruebaVector2::ordenar() { int i, j; int* temp;...
asked by 07.10.2016 / 04:32
2
answers

Copy two objects in c ++

I am developing a script which consists of a library that stores books (which are the objects of the code). I would like to create a function called Book , its main function will be to copy two books, but I can not do it. The function is...
asked by 29.06.2016 / 19:36
1
answer

Error compiling CyanogenMod

I'm trying to compile CyanogenMod (an Android 'fork') and I get a strange error code hundreds of times in different lines. The error is as follows: external/libcxx/src/strstream.cpp:326: error: no se admite la reubicación 43 external/libcxx/sr...
asked by 12.05.2016 / 11:43
2
answers

C ++ request by member 'init' in 'mainRender', which is of type 'Renderer ()' which is not class

Hello I'm having problems with the methods of a class in my program, I think it's due to the distribution in different header files, I wanted to know in which particular cases this error occurs? error: request by member 'init' in 'mainRender'...
asked by 12.09.2016 / 00:15