Questions tagged as 'c++'

1
answer

Problems with header in.h

I'm using the code below to check the computer's ip, but Code Blocks is giving error. #include <ifaddrs.h> #include <ip.h> #include <stdio.h> int main() { struct ifaddrs *id; int val; val = getifaddrs(&id); printf("Netwo...
asked by 31.08.2017 / 14:47
1
answer

How to create processes in c ++?

I have a little domain in C up to the pointers part (I'm a beginner), I have a college professor who passed a question about processes, I tried, but I do not know how to solve: Question:    Knowing that the processes generated by the...
asked by 03.10.2017 / 04:44
1
answer

Doubt in command of entry in program in C ++

I'm learning functions now in C ++ and behold, I've been trying to run this program. It turns out that when I run it it just will not let me type the value of cin>>p; it just ignores the command and moves on to the next one. I do no...
asked by 08.09.2017 / 05:43
0
answers

How to correctly use the glVertexAttribPointer () function for repeated attributes

Hello! I am trying to render a cube all red , but I did not want to specify the color for all the vertices in order to save space. For example, we would do this in the traditional way: GLfloat vertices[] = { // Position // Norma...
asked by 08.08.2017 / 16:06
1
answer

GetOpenFileName () used with user impersonation

I have a process that needs SYSTEM privileges and for this to be released by a service. When this process runs the GetOpenFileName () to open a select files dialog, I get an error message saying    C: \ Windows \ system32 \ config \ systemp...
asked by 24.08.2017 / 13:41
0
answers

C ++ library for instantiating 3D primitives with OpenGL Core Mode

I need a C ++ library that provides abstract data types for 3D primitives (cubes, spheres, pyramids, etc.) and works in OpenGL Core mode. A fictitious example of what I'm looking for is the following: int num_segments = 32; float radius = 5.0f...
asked by 25.07.2017 / 17:47
0
answers

Not returning the value when I use the QT C ++ query

When I use the following query to return the docile of the bank's data, the following message appears: QSqlQuery :: value: not positioned on a valid record I use the same code model and it is working, only the one that does not, it follows...
asked by 19.07.2017 / 15:04
0
answers

What does this mean in C ++? [duplicate]

I was taking a look at how to use templates in c ++, when I come across this here return (a>b?a:b); .   ( link ) What is this ? in the code? I tried to search in google but it did not work, it seems that ? is ignored in...
asked by 19.07.2017 / 15:29
1
answer

Reading entire file

I'm trying to read a simple file, which contains only two lines, but the program only shows one. The program: #include <iostream> #include <fstream> using namespace std; int main() { string str; ifstream myfile; myfile....
asked by 29.04.2015 / 20:46
2
answers

remove data from an object list

I'm having trouble removing an object from the list according to a code. I tried to do this: void turma::removeraluno (int matricula){ // remover o aluno pelo codigo de matricula list<aluno>::iterator it; for (it=lista.b...
asked by 02.08.2017 / 08:46