Questions tagged as 'c++'

2
answers

Error in the switch statement in C ++

#include<iostream> #include<Stdlib.h> using namespace std; class fecha{ private: int dia,mes,anyo; public: void asignarfecha(); void obtenerfecha(int *a,int *b,int *c); int fechacorrecta(); };...
asked by 04.05.2017 / 00:26
1
answer

Read console arguments in a winmain (WINAPI)

I'm modifying a small one that works only by console and requires console arguments. But now I wanted to pass it to winmain (form) and get those arguments using GetCommandLine and use them in WinMain as I did in console. The progra...
asked by 25.03.2017 / 10:42
1
answer

How can I implement a friendly function to subtract two numbers m1 and m2?

The function that adds them is given by: In the file that contains the int main (): add(m1,m2, sum); cout << "The sum is:"; sum.display_money(); In the .h file: friend void add(AltMoney m1, AltMoney m2, AltMoney& sum);...
asked by 12.02.2017 / 18:05
1
answer

When deleting a user, it is overwritten with the following

I am trying to do an exercise of a social network, and the functions are the 9 functions that are presented in the code. I have two errors right now that I do not know how to solve. If I add a user, I delete the same user and add it again,...
asked by 12.02.2017 / 01:38
1
answer

Doubt entry operator ""

I have the following function: CLliga::CarregaDades(const char* nomFitxer) { ifstream fitxer(nomFitxer); if (fitxer.is_open()) { int i = 0; (1) fitxer >> m_numJornadas; delete[] m_pJornadas; m_p...
asked by 23.03.2017 / 21:18
3
answers

What is a char data? a char data can be a numerical value? [closed]

What is char data, is that I do not know if I can give a number as a value.     
asked by 01.05.2017 / 16:06
2
answers

Convert LPWSTR to string

How could I convert a LPWSTR(Long Pointer Wide String) to string. I understand that an LPWSTR is a long pointer to a constant string. But there is some simple way to convert an LPWSTR eg: LPWSTR a = L"check"; A string: string b = /...
asked by 21.03.2017 / 12:58
1
answer

Convert string to LPCTSTR c ++

I am looking for the simple way or some way to convert a string to LPCTSTR because lately I have problems with this. For example, I have any string: string welcome; And I want to use this string in my LPCTSTR . LPCTSTR ejemplo = "aq...
asked by 13.12.2016 / 00:56
2
answers

I can not create a form in c ++ using sharpdevelop

Hi, I want to create a form but for c ++ the problem I can not show you a picture of the objects that I can: The problem is that I want an idea similar to visualstudio but at least I can create my own forms in c ++ and so far I have not ma...
asked by 13.01.2017 / 04:43
2
answers

What is the difference between the container std :: map and std :: unorderedmap

What is the difference between these STL containers std :: map and std :: unorderedmap, also when looking for an element which is more efficient.     
asked by 13.01.2017 / 16:03