Questions tagged as 'c++'

1
answer

How do I get data from a file with fscanf, in c?

Code: while(fscanf(arq,"%d %d %d\n\r",x[i],y[i],raio[i])!=EOF){ cout<<x[i]<<endl; i++; } File content: mdb236rl D CALC B 912 2247 58 mdb240rl D CALC B 1752 776 95 mdb244rm D CIRC B 1940 1209 209 mdb...
asked by 19.02.2018 / 14:15
1
answer

Why is it impossible to use OpenGL in Qt 5?

Probably OpenGL is the only thing I can not use in Qt, Maya and 3Ds and another autodesk program pa uses opengl in qt, but no tutorial or example that works. I have already created a class for the widget based on QOpenGLWidget (Since QGLWidge...
asked by 29.01.2018 / 14:24
1
answer

Randomizing Crashing Program

I'm working with Lists in C ++ and while doing the following code to implement a list: #include <iostream> using namespace std; class NO{ int idade; string nome; NO *no; public: void setDados(int, string);...
asked by 03.02.2018 / 00:07
0
answers

'do while' or recursion on a switch? [duplicate]

I have 2 models of code here, please note: Template 1 (using 'do while'): int main(){ char opc; do{ std::cout << "|============|\n"; std::cout << "|Escrever.[1]|\n"; std::cout << "|Ler....
asked by 01.02.2018 / 03:39
0
answers

Problems using the Windows API Common File Dialog

I'm trying to use a windows API called Common File Dialog to create a window to open and save files. However I can not use the sample code that is there: link First of all: IFileDialog. It seems to be contained in a library called "Shobjidl",...
asked by 28.01.2018 / 01:02
1
answer

Error running Hello World project with default eclipse CDT

I'm trying to use the default code that comes in the Hello World project in Eclipse CDT (I'm using minGW), but when I put it to run the project nothing appears on the console, only that the application has been terminated. Initially, an error...
asked by 26.01.2018 / 16:07
0
answers

Error of indefinite reference - Allegro 5

I installed the Allegro 5 lib with the following script: cd ~/Documentos sudo apt install -y git build-essential subversion cmake xorg-dev libgl1-mesa-dev libglu-dev install libpng-dev libz-dev libcurl4-gnutls-dev libfreetype6-dev libjpeg-d...
asked by 18.01.2018 / 13:39
0
answers

multi resolution with cosco2dx for android

I want to develop a game for android using the cosco2dx, but I came across the issue of the android resolution to countless screens of different sizes, I searched a lot and even studied how coosco2dx works the images with opengl veiwport I fo...
asked by 24.01.2018 / 19:54
1
answer

Difference between std :: list, std :: vector and std :: array

All containers used to guard data sequentially, but what are the main differences between them?     
asked by 04.11.2016 / 17:30
3
answers

How to put a ";" at the end of the string, program in c

I would like to know what to do for the ";" no print appears after of the string and not before . I'm new to programming and would like to appeal to your help. Thank you Input Linha1 Linha2 Linha3 Linha4 Expected output Produ...
asked by 13.01.2018 / 18:09