886 questions
I know how to use two buffersHow do I reverse a C/C++ string using only one buffer?for(int i=0; i<strlen(s1); i++) s2[strlen(s1)-i-1] = s1[i];
#include <iostream>struct Tag{ enum class A { testA }; enum class B { testB };};class Test { Tag m_Tag; Test(Tag tag) : m_Tag(tag) {}};int main(){ Test* test = new Test(Tag::A::testA);}It's a...
char *a[] = { Hong Gil-dong, Kim Gil-dong, Lee Gil-dong, Park Gil-dong, Choi Gil-dong};All the other computers up there are working fine, but strangely, I...Hong Gil-dong, Kim Gil-dong, Lee Gil-dong, ...
// Declare score variables in the Player classm_nScore;Player::Init(){ m_nScore = 0;}// Getter int GetPlayerScore() { return m_nScore; }// Dynamic Assignmentm_pObjects = new Objects;m_pObjects->Set...
While studying, in the lecture notesOverloaded assignment operator not inherited – But can be invoked from derived classConstructors are not inherited– Are invoked from derived class’s constructor Tha...
string msg1 = hello, hello, kk, kkkk, rrrr;I want to change hello to bye when I'm withstring.replace() is not the function I want
Why do I get a compilation error in my code?And why does it work well if you convert MEMBER to int without code 1?(compiled in g++ 4.2.4)#include <vector>class Foo { public: static const int ME...
class Car{ public: int speed;};int main(){ int Car::*pSpeed = &Car::speed; return 0;}I saw this code, and I wonder when int Car::*pSpeed=&Car::speed; is used in main.
#include <stdio.h>class myclass {public: myclass() { printf(a); } myclass(myclass& r) { printf(b); } void operator = (myclass& r){ printf(c); } };int main(){ myclass a; myclass b(a); myc...
When you say that an input is always entered as a stringI don't know the length of the string to be enteredI need to determine the size of the char array, what should I do?If the size is input first, ...
« | - 61 - | » |
© 2024 OneMinuteCode. All rights reserved.