886 questions
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...
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...
When do you use unsigned char in C/C++?What's the difference from just char?
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...
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...
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...
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...
// TestClass.htemplate <typename T>class TestClass{ TestClass();}// TestClass.cpp#include <TestClass.h>template <typename T>TestClass<T>::TestClass(){}We're trying to implement...
class Person{public: Person *GetThis() { return this; } void *VgetThis() { return this; }};int main() { Person *p1 = new Person(); cout << p1 << endl; cout << p1->GetThis() <...
#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...
« | - 74 - | » |
© 2024 OneMinuteCode. All rights reserved.