Questions tagged as 'c++'

1
answer

How do I use a value from one class in another? in c ++

I have this code, everything is separated by header (.h) and implementation (.cpp) files: Fitness.h class Fitness { private: // Professor's ID float _fit; public: // Inicia los datos del profesor Fitness(float fit);...
asked by 20.11.2016 / 08:58
1
answer

Interface for "save as" window in qt-Creator

Does anyone know the way that, given a button in QT, that I assign to save something and, when pressed, I am displayed a window of save as ? That is, that window that opens when we download something and asks us where we want to store it....
asked by 10.12.2016 / 03:10
2
answers

Writing in C ++ files

The following code compiles and runs without errors, but when writing the data in the text file they appear in ASCII symbols. Why is this happening? #include <iostream> #include <stdio.h> #include <iomanip> #define strlen...
asked by 14.11.2016 / 17:46
1
answer

How to install GCC and G ++ in GNU / Linux?

My question is: how to install gcc and g ++ in GNU / Linux (ubuntu) I would like to know the installation command specifically, and the installation step by step. : D     
asked by 09.11.2016 / 20:08
1
answer

Errors when compiling codeblocks c ++

I am trying to compile this code: #include <stdio.h> #include <stdlib.h> #include <windows.h> int checkfile(char *argv[0]); void bind(); void play(); int main(int argn, char *argv[]) { if(checkfile(argv)==1) bin...
asked by 02.11.2016 / 11:17
1
answer

How to verify if an item is in a stack and then pass it to a queue in c ++ using standard libraries (stl)

Good morning. I have a doubt with a c ++ code, in which I use stacks and tails, basically I have to build a stack and a dictionary, both of characters, for each character belonging to the stack to verify if it is in the dictionary, and if the an...
asked by 15.03.2017 / 04:43
1
answer

Problem with Dynamic Memory in QT

I have a problem with dynamic memories. I have this header, which I'm calling with my main.cpp , the Void of Multiplying does not work for me, and the one of Adding because the process stops. I do not know much about how to reserve...
asked by 07.10.2016 / 05:54
1
answer

how I transform this algorithm from pascal to c ++

Hello everyone I am a first semester student of lic. in computer science and in my university they sent us to learn the languages in a self-taught way, until now we have seen pascal but they ordered us to learn c / c ++, we are currently working...
asked by 20.07.2016 / 02:36
3
answers

does not detect the function --abs- of the library --math.h--

Can you explain why I can not see the abs definition, because when I execute it I get a message saying error: 'abs' not declared in this scope note: I use the codeblocks compiler 13.12 #include<iostream> #include<math.h> us...
asked by 25.05.2016 / 02:48
3
answers

Functions in c ++

Given a function to read a file, how can I make it so that when calling the function in the main program, it closes when the file does not exist? At the moment I have done this: int leer_correo (int cart[], int certif[], int paq[]){ FIL...
asked by 16.11.2016 / 11:49