c++11 tag

31 questions


2 answers
152 views
0
std::is_same does not appear to be working properly.

Hello, everyone I have a question because there was a slight error in writing the c++ and stl codes.The code with the error first is as follows. An error occurs in the annotated area is processed.temp...

2 years ago

1 answers
131 views
0
When using deque in C++, the type when using auto

How do I declare the same type of it in the for statement in the code below?It doesn't come out properly even if I use typeid My prediction is std::deque::iterator, is that right?#include <iostream...

2 years ago

1 answers
99 views
0
To load 3 C++ min, max function factors

Creating the biggest square find problem board[i][j] = min({board[i-1][j], board[i][j-1] , board[i-1][j-1]})+1;I don't understand the codeOriginally, I know that the min function brings the minimum va...

2 years ago

1 answers
90 views
0
To return an array from a class member function

Create a class and there is a member function in it.This member function must return 'array'.By example code class class_df {public : class_df(); void initialize(); float class_df::calculate(int, floa...

2 years ago

1 answers
141 views
0
I need a code to find out if I'm using the C++ compiler during runtime

Not using #ifdefCan you make a function that returns 0 when using C compiler and 1 when using C++ compiler?For example, int isCPP(){ return sizeof(char) == sizeof 'c';}//orint isCPP(){ typedef int T; ...


1 answers
55 views
0
Can the code compiled in C++03 and C++11 produce different results?

It's the same as the question.Can the code compiled by C++03 and C++11 produce different results?Not if it doesn't work on one side. Is there a case where both are executed, but the results are differ...


1 answers
93 views
0
I would like to know the difference between 'std::unique_ptr' and 'std::auto_ptr' from C++11. I think the two of you use the same method, but what's the difference exactly?

I would like to know the difference between std::unique_ptr and std::auto_ptr that occurred from C++11. I think the two of you use the same method, but what's the difference exactly?

2 years ago

1 answers
112 views
0
I want to print out the type of variable.

In c++, how do you output a variable type?I checked it using type() in Python, but I am asking because I think there will be such a method in C++. What is the function that functions typeof(a) in the ...

2 years ago

1 answers
101 views
0
Compiling from g++ to C++11

I want to change my C++03 compiler to C++11 compiler in Ubuntu 12.04I looked it up and it said to give the option -std=c++0x or -std=gnu++0xThere was an error on my computer.I don't know exactly how t...

2 years ago

1 answers
107 views
0
Questions about initializing c++ member variables

#include stdafx.h#include <iostream>using namespace std;class foam{public: int temp_c ; foam() { temp_a = 10; temp_b = 20; } int temp_a ; int temp_b ; void printdata() { cout << temp_...

2 years ago
« - 3 - »

© 2024 OneMinuteCode. All rights reserved.