Questions tagged as 'c++'

2
answers

C ++ error LNK2019 Unresolved external symbol

I have an error and I do not know how to solve it, extra information is: Visual studio 2017, in an empty project.    LNK2019 unresolved external symbol "public: static void __cdecl   Bisection :: start (void) "(? Home @ Biseccion @@ SAXXZ) re...
asked by 26.10.2018 / 03:11
1
answer

Constructor with member variable?

I have a question about the following main #include "Pokemon.h" int main() { Pokemon piplup("Piplup", Pokemon::Agua); piplup.mostrar(); cout << endl << endl; } I must say that the main is a reference that the teacher passed us...
asked by 11.11.2018 / 01:03
3
answers

How to convert string to char *?

I wanted to ask about how to convert a string to a char *, the case is the one shown below, where I have a defined string and I want to name the variable x using .setName (), but it receives a char *, so that I can not simply place variable name...
asked by 13.11.2018 / 18:32
2
answers

Is it correct to mix variables int and double making casts?

Is it a bad practice that I perform in this program mixing variables / constants of type int with others of type double? Should I declare them all as double and not do as much cast? Thank you. #include <iostream> using std::cout; usi...
asked by 27.04.2016 / 20:11
1
answer

line breaks in popen with c ++

I am working on a project where I have to execute a command and print the output. Use popen, and it serves, but the output does not show the line breaks, if not, it shows everything as a single line. My code: #include <iostream> #incl...
asked by 06.09.2018 / 18:22
1
answer

error: invalid use of void expression

In this code I skip the following error: invalid use of void expression. More precisely in return ciclo_Euleriano(g, g.getVertices().pop_front(), g.getVertices().pop_front()); and I do not know why it is. bool ciclo_Euleriano(con...
asked by 09.07.2018 / 21:05
1
answer

fstream c ++ error

I have this piece of code, void saveGame(vector<Usuario *> vector) { fstream file_obj; file_obj.open("users.dat"); for(Usuario *u: vector){ string auxName,auxPassword; auxName = u->getName(); auxPa...
asked by 13.05.2018 / 00:28
1
answer

Doubts about pointer arrays

I have a doubt between the behavior of two arrays declarations. And it is not related to the dynamic allocation of memory, but how to access the objects of the array. I explain. Case a: Suppose I define an array in the following way. Ti...
asked by 30.04.2018 / 12:49
2
answers

One-dimensional arrays in C ++

What are the one-dimensional arrangements for? int Temp[12];     
asked by 10.04.2018 / 16:08
1
answer

I can not use a global variable in main c ++

Class.h: class Clase{ ... } Class.cpp: #include "Clase.h" int var_global; ... Main.cpp: #include "Clase.h" #include <iostream> ... std::cout<<var_global<<std::endl; ... The Problem When using the variabl...
asked by 17.04.2018 / 01:07