Posts by josuegomes • 248 points
10 posts
- 
		1 votes1 answer47 viewsA: C++ - Is it right to create new types using?The using can be parameterized, the typedef no. Except that they are identical. I don’t know why Visual Studio gets complicated with this. Qt Creator also shows in a strange way. I haven’t tried… c++answered josuegomes 248
- 
		1 votes1 answer58 viewsA: C++ - Implementation of class Statica cppIn the header file you are just declaring the static variable. In other words you are just giving a name and a type. The variable is not "created". Somewhere else (for example, in the corresponding… c++answered josuegomes 248
- 
		0 votes2 answers51 viewsA: Opencv in Codbloks c++You didn’t say how you set up the library in Code::Blocks. But if you used "Project Build Options" then you need to do it for the Release configuration and for the Debug configuration. If you did it… c++answered josuegomes 248
- 
		1 votes1 answer634 viewsA: How to compare string in text file with user imput and do validation?I believe you’re referring to this here: while(fscanf(paises, "%s", &nomeAux)!=EOF){ if(strcmp((aviao+i)->nomePais, nomeAux)==0){ flag=1; break; }else{ flag=0; break; } } You have not… 
- 
		2 votes1 answer581 viewsA: Segmentation failure in C languageThe gcc generates several warnings when you compile your code. Check warnings and fix them. But the error is occurring because you are trying to use an invalid pointer: int *data; in scanf("%d",… 
- 
		0 votes1 answer83 viewsA: passage by struct reference does not work (Dynamic queue C)There are several problems in the code. In function enfileirar() the parameter fim should be a pointer to pointer: void enfileirar(struct no **inicio, struct no **fim, int valor) { And that forces… 
- 
		1 votes2 answers263 viewsA: Compile c++ code with makeAs your . obj are in a subdirectory you need to add this subdirectory as a prefix: OBJS = $(addprefix $(ODIR)/, main.o src.o) The rule also needs to use the subdirectory: $(ODIR)/%.o: $(SDIR)/%.cpp… 
- 
		0 votes1 answer33 viewsA: Does not enter the function and gives fault SegmentationDeclare even and odd as apontador par, impar; Pass the address to the parImpar function: parImpar(&par, &impar, lista); In the parImpar() function call inserts.… canswered josuegomes 248
- 
		0 votes2 answers226 viewsA: Build error in C++ when accessing structure in functionBest a purely C solution++: #include <iostream> #include <string> #include <vector> struct Pessoa { std::string nome; std::string profissao; int idade; bool ativado; }; void… 
- 
		1 votes1 answer57 viewsA: Warning: "No local application has been provided. You can set it in the Run menu, Parameters" Dynamic DLL Creation Problem in C++ in DEV++It looks like you are trying to run the DLL project. You need to create two projects: a project of the type DLL where you will place the code of your Helloworld() function in the dllmain.cpp file;…