c++ tag

886 questions


3 answers
19 views
0
I'd appreciate it if you could help me solve the c++ problem

I'm asking this question because there's a part where I'm stuck while solving Baekjun'shttps://www.acmicpc.net/problem/12779( issue original)It's a problem where the numerator is the square number wit...

c++
2 years ago

1 answers
87 views
0
To clear all the opening characters of std:string

I want to erase all the opening characters of the string (including \n, \r, \t).I'm using the method below. Is there a better way?Oh, and tell me how to erase the opening text in front of mestd::strin...

2 years ago

1 answers
118 views
0
Why do you have unsigned char?

When do you use unsigned char in C/C++?What's the difference from just char?

2 years ago

1 answers
90 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
92 views
0
Findclass result is 0 when recalling Java method using JNI in c++.++

JavaVMOption options; JavaVMInitArgs vm_args; JNIEnv* env; JavaVM* jvm; long status; options.optionString = -Djava.class.path=D:\\DEV\\javaworkspace\\Open; vm_args.version = JNI_VERSION_1_8; vm_args.n...

2 years ago

1 answers
64 views
0
A C++ core dump error occurs.

When you know the minimum and maximum values, you want to store all the integers in between in an array, including these.#include <iostream>#include <vector>int main() { std::vector<int...

2 years ago

1 answers
104 views
0
Is strlen() calculated every time in the for statement?

for (int i = 0; i < strlen(ss); ++i){ // Hello}If you think about it, the ss might change inside the for statementI think strlen(ss) should be calculated every timeBut if you do strlen() every time...

2 years ago

1 answers
22 views
0
Question when creating a template class

// TestClass.htemplate <typename T>class TestClass{ TestClass();}// TestClass.cpp#include <TestClass.h>template <typename T>TestClass<T>::TestClass(){}We're trying to implement...

c++
2 years ago

1 answers
18 views
0
C++ basic question.

class Person{public: Person *GetThis() { return this; } void *VgetThis() { return this; }};int main() { Person *p1 = new Person(); cout << p1 << endl; cout << p1->GetThis() <...

c++
2 years ago

1 answers
132 views
0
Ubuntu C++ error: undefined reference to 'clock_gettime' and 'clock_settime'

#include <iostream>#include <time.h>using namespace std;int main(){ timespec time1, time2; int temp; clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &time1); It's like a party clock_gettime(CL...

2 years ago
« - 74 - »

© 2024 OneMinuteCode. All rights reserved.