Questions tagged as 'c++'

1
answer

Reading values from a string

I started to study c ++ now and I do not quite understand it yet. I need to get a lot of information on each line of a string vector, so I thought I'd use sscanf , however I'm getting the following error: In function ‘int main()’: error...
asked by 15.02.2018 / 15:18
1
answer

List simply chained - Problem in method

I'm having a problem with the delete_find_number method of my code. This is as follows: This method should exclude a specific number that is passed as a parameter. After receiving the parameter, this method calls another method called...
asked by 23.02.2018 / 06:14
2
answers

Suggestions for code improvement

Good evening, I created a Joga from the Forca in C ++ as an exercise and would like to receive suggestions for code improvement. Thank you in advance for being able to respond. Follow the code: #include <windows.h> #include <iostre...
asked by 24.01.2018 / 00:41
1
answer

Change an attribute of a base class by the C ++ derived class

I have a problem involving inheritance in C ++, I can not change an attribute of a base class eg: // classe base class Base { vector(string) Names; //coloquei entre parenteses porque por algum motivo o string desaparece quando coloco da m...
asked by 23.01.2018 / 21:28
1
answer

edges of an array N x N

I would like to know how to set the edge values of an array to -1. I've tried to create an array of N + 2 x N + 2, and do it with a single, go through the edges, but when I put it to print it displays some strange values. I believe you have acce...
asked by 09.02.2018 / 04:17
1
answer

C ++ program hangs when I use a function to get the name of a file

I'm doing a small IDE in c ++ and I'm having trouble getting the name of a file. ex: the full path of the file is "keywords // cplusplus.txt" however the file name is "cplusplus.txt". So I wrote a function to get the real name. char* Io::GetRe...
asked by 08.01.2018 / 23:16
1
answer

stack insertion vector returning all zero

Now, I posted the algorithm for this address below here because I had problems with unpacking and removing was solved until then. Deploying Dynamic Stack But as I was reviewing the code and therefore leaving them better I decided to put a...
asked by 19.01.2018 / 22:14
1
answer

What is this operator **? [duplicate]

What is this ** operator, and what is it for? Every time I come across a piece of code in C ++ with this operator. And if there is a relationship with * , what's the difference?     
asked by 28.12.2017 / 03:47
1
answer

composition and validation

Personal I have a struct called Contact with variables std :: string and a ready class of mail validation using regex. I am creating a program and do not need to create another validation function for this contact class I made the include of...
asked by 24.12.2017 / 16:24
1
answer

Object created inside conditional If it generates compiler error c ++

I'm having trouble compiling a C ++ program in IDE Code :: Blocks. What I'm trying to do is access an object that was instantiated inside a conditional If. I will put down the codes of the main program and also of the classes that I created....
asked by 02.01.2018 / 01:34