c++ tag

886 questions


1 answers
26 views
0
To write multiple characters in a single quote

The chords at the bottom1952805748I printed it out.Why?Is it the address or something?cout << 'test'; // Note the single quotes.

2 years ago

1 answers
89 views
0
What's the difference between new and parentheses?

When you create an instance of the Test class that I define.What's the difference between the two?Is there a difference?


2 answers
26 views
0
To set the size of an array to a variable

int cnt;const int * cntptr = &cnt;cin >> cnt;int arr[*cntptr];I can't...Is there any way to receive the size of a variable as a variable> ㅠ

c++
2 years ago

1 answers
100 views
0
Can't I use an assistant?

The creator of Go language wrote it down hereDoes everyone else think the same?Why doesn't Go have an Assertion?Go does not have an assessment. It's certainly convenient to have, but in our experience...

2 years ago

1 answers
85 views
0
It's a question related to C++, but it's hard, so I'm leaving it "T"

Hello, the school gave me homeworkIt's my first time with C++. I'm asking you a question because you gave me this homework after the first hour of C++

2 years ago

1 answers
75 views
0
What should I do to add code to the Rectangle class so that the code called Rectangle; in main() can be executed?

class Point{public: int x, y; Point(){} Point(int xx, int yy) { x = xx; y = yy; }};class Rectangle{ Point p; int width, height;public: Rectangle(int x, int y, int w, int h) { p.x = x; p.y = y; width...

2 years ago

1 answers
21 views
0
Constant of C++ member variables

class Test{ constant temp = 1000; // The above behavior is said to be impossible in hot blood C++.};It worked well in VS2017 standards. Is the standard changed because the book of the hot blood is old...

c++
2 years ago

1 answers
20 views
0
Why write (!=) as (!(a==b)) in standard library code?

This is the remove code from the C++ standard library.Why do you check that it is not the same as !(*first=val) instead of (*first!==val)Other than remove, there are many other standard libraries that...

c++
2 years ago

1 answers
101 views
0
Code to locate the C file currently running

How do I find the location (absolute path) of the C file currently running in the code?I want argv[0] to accept it, but he doesn't.

2 years ago

1 answers
53 views
0
Visual studio 2017 c++ if and else statements are not executed.

When you are coding a red black tree and debug granpa!= nullptr even though it is true, the entire phrase is skipped.I stopped it in debugging mode and checked it by pressing f11, but I only ran the l...

2 years ago
« - 68 - »

© 2024 OneMinuteCode. All rights reserved.