Questions tagged as 'c++'

3
answers

How to avoid an error when a number is expected as an input and the user types a letter? C ++

void getPiezas(int* piezas,int* f2){ cout << "Digite cantidad de piezas a procesar\n"; cin >> *piezas; ... } if the user types a letter instead of a whole number or if you enter a double instead of a int ....
asked by 07.05.2017 / 22:23
1
answer

You doubt about loop for

I have two weeks, there is an exercise where the program has to say the lowest temperature and the highest of all that you have set, how would it be done? . Thank you. #include<iostream> using namespace std; float t1,temperatura_media,...
asked by 03.10.2018 / 19:42
0
answers

Load an array of a file in C ++

I'm trying to read a file and load it into an array in c ++ like this: int main(int argc, char **argv){ if (argc != 2){ cerr << "Sample call <mat.cc> <filename>" << endl; } string filename(argv[1]); MAT G = readGra...
asked by 28.09.2018 / 18:00
0
answers

doubt of recursion

I share this code in which it is about entering product data from a store using recursion, well my question is when I use recursion to compare the results on the amounts of each product to tell me what is the the amount that is repeated, I get a...
asked by 07.10.2018 / 01:56
1
answer

search for elements of a c ++ stack

Good evening I have the code of a practical job with the opcones to insert items into a stack and search, when looking for this number I have to extract all those that are divisible by the same number entered. Here is the code, the part where th...
asked by 03.10.2018 / 04:17
0
answers

How do I write in a file / file at the beginning?

I'm doing a program in which I need 2 options, one to insert at the beginning and another to insert at the end, I know how to insert it at the end which is adding the "app" flag and the cursor will be written at the end of the file, my question...
asked by 29.09.2018 / 22:20
0
answers

Arduino problem

I must program a compression of a 13-bit code to an 8-bit code for an Arduino board, I declared ports 52 to 28 as inputs, and outputs 53 to 39, but when programming the only port of entry that works well is 53. For example, I declared an arra...
asked by 20.09.2018 / 07:52
0
answers

How to know the cardinality of a matrix in c ++?

I wonder if someone could help me know what a code would look like to know the cardinality of a matrix in c ++.     
asked by 15.09.2018 / 19:01
1
answer

method sort () gives me unexpected error, in C ++ (QT)

I have a list that stores objects like AIRCRAFT and I want to sort it by one of its float parameters downwards. In a class called airport I have a floating fleet static list, in which, in a part of the program I fill all the data. Code of...
asked by 09.10.2018 / 14:41
0
answers

fatal error C1083: Can not open precompiled header file

I am trying to compile the following project: link For this, I have followed the following guide to the letter: link I miss this error when I try to compile: fatal error C1083: Cannot open precompiled header file: 'Release\Relyxia.pc...
asked by 04.10.2018 / 11:45