c++ tag

886 questions


1 answers
358 views
0
c++ question

using namespace std;class Point {private: int x; int y; static int numCreatedObjects;public: Point() : x(0), y(0) { numCreatedObjects++; } // constructor receiving int_x and int_y as inputs Point(int...

c++
1 years ago

1 answers
351 views
0
Is it guaranteed that implicit type conversion is not considered in the type template argument?

Is it guaranteed that the primary template will be selected when a class template with full specialization of long is materialized with int, as shown in the following code?#include<iostream>temp...

c++
1 years ago

1 answers
300 views
0
I want to implement the file transfer function in visual studio.

I would like to implement c++ with visual studio to transfer files in Windows via ftp onto Linux machines, but when I look at the sites I found, I can't include header files, or I don't know if they c...

1 years ago

1 answers
297 views
0
Understanding How Class Template Partial Specialization Matching Works

How do you match partial specialization?For example, I do not know why the following code cannot be compiled:$clang-vclang version 9.0.0-2 to ubuntu 18.04.2 (tags/RELEASE_900/final)Target: x86_64-pc-l...

c++
1 years ago

1 answers
357 views
0
I want to use the dependent type in CRTP, but I get a compilation error.

template<typename Derived>US>structure S{ using I = typename Derived::T;};structure D:S<D>{ using T=int;};int main(){ DD; return 0;}How can I use D::T in S with the above source code?

1 years ago

1 answers
493 views
0
How to load ini files and connect to Oracle in VisualStudio 2008

Nice to meet you, as the title says We are trying to create a function that reads information in the ini file, connects to DB, and deletes it.I've looked into various things, but I've only used Nuget,...

1 years ago

1 answers
282 views
0
I have been thinking about the cpp "char" 1byte send/receive code for a month.crying

Hello, I'm a beginner at Cpp.The code at the bottom is the example code that I referred to. The first code is the code that I modified.참고한 git는 https://github.com/gbmhunter/CppLinuxSerial 입니다.'#define...

c c++
1 years ago

1 answers
452 views
0
Data structure (for stacks and queues)

Data structure (stacks and queues)I would like to ask you something from the perspective of competition programming and practice.C++ and others think that stacks and queues are in the standard library...

1 years ago

1 answers
258 views
0
SDL2 on Debian

I would like to use SDL2, but for some reason the window does not appear.As far as the log shows, the program seems to be working.However, the window does not appear.If you know the solution, please t...

1 years ago

3 answers
261 views
0
What happens when you use parentheses when initializing a C++ structure array?

An example is the Point structure, which you want to store in a C-format array.If you define each element in parentheses as shown below, there will be no compilation error, but Output does not meet ex...

c++
1 years ago
- 1 - »

© 2024 OneMinuteCode. All rights reserved.