Questions tagged as 'c++'

0
answers

Problems with wxWidgets

I'm doing a project using wxWidgets, and when I compile the message appears: error: can not specify -o with -c, -S or -E with multiple files. I'm using codeblocks in ubuntu and I do not know what to do with this error.     
asked by 23.01.2017 / 12:53
1
answer

Error in project in Code :: Blocks [duplicate]

I have installed g ++ and Code :: Blocks (Linux-Ubuntu) and I created a project and I used the code of the Code :: Blocks file ( main.cpp ), when I give run a written tab appears    It seems that this project has not been built...
asked by 10.12.2016 / 03:12
1
answer

Help with bit shift in C ++

Well, in a programming exercise I was given the following program, and asked what is your output using namespace std; union U1 { union U2{ unsigned a: 3; unsigned b: 4; unsigned c: 1; }u2;...
asked by 29.11.2016 / 01:50
0
answers

FIFO - Restore communication in C ++

I have a main program written in C ++. It triggers child programs using vfork () and execl (). The communication between them works perfectly using FIFO (the parent writes and the child reads). In the main program the sequence to establish th...
asked by 17.11.2016 / 14:05
1
answer

Push Back with Copy Builder

I do not understand why when I create a copy constructor and push it back into a vector, it calls the constructor more than once! If I only do 1 push back, it will show the copy builder 1 time. if I do 2 push back it increases to 3. I woul...
asked by 10.11.2016 / 17:36
0
answers

error: no match for 'operator' (operand types are 'std :: ostream {aka std :: basic_ostreamchar}' and 'const std :: runtime_error')

Program code main #include <iostream> #include "CntrIU.h" #include "CntrNeg.h" #include "interfaces.h" #include "stubs.h" #include <cstdlib> using namespace std; int main() { IUAutenticacao *CntrAut = new CntrIUAut();...
asked by 30.11.2016 / 16:45
0
answers

Saving files in txt with c ++

I am trying to create a program that saves the hashed stored data in 4 different txt files, as it is the hash index it chooses the file it should save. example: hash índice 0 = txt_0.txt hash índice 1 = txt_1.txt hash índice 2 = txt_2.txt h...
asked by 28.10.2016 / 14:36
2
answers

Separating substrings and storing in C ++ variables

So, I created a function that reads a text file and saves, line by line, into a vector of strings by removing the commas. The file entry is: add $t2, $t3, $t4 sub $t5, $t6, $t7 addi $t6, $t7, 4 Applying the function: void openFile(char...
asked by 14.10.2016 / 04:04
1
answer

Error reading from file in C ++

Can anyone tell me why the output of this program is just being "end"? The file naocompre.txt is in the same directory as the program. Follow the code: #include<iostream> #include<fstream> #include<string> using namespace...
asked by 14.10.2016 / 02:47
1
answer

Deque (C ++): Abort trap 6

I'm trying to call a function that I did, but this error always appears: libc++abi.dylib: terminating with uncaught exception of type std::out_of_range: deque EXECUTAR FINISHED; Abort trap: 6; tempo real: 230ms; usuário: 0ms; sistema: 0ms...
asked by 05.10.2016 / 19:41