c++ tag

886 questions


1 answers
108 views
0
To change string to int

How do I change string(char*) to int in C++?If the string is not a number, I would like to give an error in moderation rather than returning 0 (false).

2 years ago

1 answers
59 views
0
Why can't Iostream::eof be used in the loop?

I heard that writing iostream::eof in a conditional sentence is a bad ideaI usually write while(cin>>n) together and check EOF.But why can't I write iostream::eof myself and check it?From C scan...

2 years ago

1 answers
33 views
0
Wmain compilation error

#include <stdio.h>#include <windows.h>int wmain(int argc, wchar_t* argv[]) { LPSTR str1 = SBCS Style String 1; LPWSTR str2 = LWBCS Style String 1; CHAR arr1[] = SBCS Style String 1; WCHAR ...

c c++
2 years ago

1 answers
33 views
0
C++ PlaySound function file path specification? Related Questions

I have to submit the game as a school team play this time, so I want to insert music into the game. So I searched several places, but it just didn't work (Crying)There is a function called PlaySound, ...

2 years ago

1 answers
102 views
0
The debug mode and the release mode are different. Why?

The chords are weird.Visual Studio 2008 is developing it, but why will it be different when it is debugged and released? int _tmain(int argc, _TCHAR* argv[]){ for( int i = 0; i < 17; i++ ) { int...


1 answers
112 views
0
Do I have to make an exception for all the blocks?

In the case of reducing the exception, it is safe to deal with exceptions.Then should I make an exception by using all those blocks as a try-catch?Doesn't that make the code too messy?



2 answers
110 views
0
This is a question related to C language Heap.

typedef struct HeapElement{ DSKEY heKey; void * heData;} } HeapElement;struct Heap{ int hpMode; /* Minimize or Maximize */ int hpSize; int hpFilled; int hpGrowBy; HeapElement** hpArray; HEAPCMPFUN...

2 years ago

1 answers
25 views
0
C++ questions

The question is a simple question that takes 10 integers and outputs how many 60 points or more.I don't know what I did wrong. If there's something wrong with this part, it'd be better to do it like t...

c++
2 years ago

1 answers
24 views
0
Error: passing xxx as 'this' argument of xxx discards qualifiers

In the code below,cout << itr->getId() << << itr->getName() << endl;There's an error here, but I don't know why ㅜㅜWhy does const StudentT appear in the error when there...

c++
2 years ago
« - 53 - »

© 2024 OneMinuteCode. All rights reserved.