Questions tagged as 'c++'

2
answers

Doubt with operator ==

Having the following operator declared in a string class, would it be correct to use it in a split class in the following way? Operator: bool CCadena::operator==(const CCadena& obj) const { return strcmp(m_pText, obj.m_pText) == 0;...
asked by 16.03.2017 / 18:14
1
answer

Indefinite reference 'WinMain @ 16' c ++

Hello, the command is as follows: gcc -o main.dll dllmain.o -L/c/Users/Androide/Desktop/colo/pupa/dllmain/ -lSDL -lSDLmain -lmingw32 I get the error when compiling my project, the error is as follows: > $ gcc -o main.dll dllmain.o >...
asked by 16.03.2017 / 01:33
1
answer

getline will not let me enter text

I am using the following piece of code in which I enter a string and it is saved in the file but it does not leave any character in the string because it does not pause, it executes the instructions that go after const size_t longitud = 100;...
asked by 18.02.2017 / 18:58
2
answers

Initialization of values in struct - C ++

the thing is in I create a struct the: struct salari{ unsigned int base; unsigned int dietes; unsigned int total=base+dietes; }; and after doing the main: int main(){ salari a; a.base=100; a.dietes=2; cout<<a.base<<endl; cout&...
asked by 07.01.2017 / 13:48
1
answer

Random list sound

Sale I can not convert string to const char #include <iostream> #include <cstdlib> #include <ctime> #include <string> #include <windows.h> #include "MMSystem.h" using namespace std; int main(int argc, char** a...
asked by 30.12.2016 / 20:00
1
answer

Create a rule in regedit with C ++

Hi, I want my application to be started from the startup, that is, when I start up my windows. It is an application that I use very often and it is annoying to start it over and over again. Well what I want my subkey value is the path of the pro...
asked by 10.12.2016 / 14:31
1
answer

Why when running my code does not make any changes on the screen?

codeblocks edition Good, my problem continues with the compiler of the codeblocks or the way in which compiled, in several Youtube courses I have seen that they do not have this problem and none I could give reason. What happens is that when...
asked by 02.03.2017 / 04:42
1
answer

Sub-fix by template

The title is somewhat complicated to understand, so I'll summarize by code. Suppose we have a template that wraps an array: template <typename T, std::size_t TAMANYO> struct arreglo { using value_type = T; using arreglo_type = ar...
asked by 30.11.2016 / 17:05
1
answer

Arrangement of a structure in binary file

We have a small error We create a user: usuarios[0].nombre and usuarios[0].pass This is saved in a binary file and all created users are displayed. Then I create a user: usuarios[1].nombre and usuarios[1].pass This...
asked by 20.11.2016 / 00:17
3
answers

Add the elements of two linked lists in a third list

The idea is to represent a three-digit sum 6 8 9 <---- valores de lista 1. 5 7 4 <----- valores lista 2. ------------- 1 2 6 3 <------ valores lista 3. So far I get the result of the sum, but taking the values fr...
asked by 14.12.2016 / 22:21