886 questions
#include <iostream>#include <string.h>using namespace std;class String {private: char* strData; int len; public: String() : strData(NULL), len(0) {} String(const char* str) { len = strn...
#include <iostream>using namespace std;class CTest{public: CTest() { m_Value = 0; } CTest(const CTest& obj) { m_Value = 2; } int m_Value;};void main(){ CTest t; t.m_Value = 1; CTest t1(t);...
#include <iostream>#include <string>using namespace std;class CPerson{public: CPerson(string _name, int _id) { m_Name = _name; m_ID = _id; } CPerson(const CPerson& _person) { m_Name...
It's a basic question I created a function that swaps pointer addresses with each other, but when I print it out, it becomes the original value.Debugging doesn't solve the question! #include <iostr...
#include<iostream>using namespace std;int main(){ int i = 10, j = 0,k=0; for (i; i < 31; i++) { for (j; j < 6; j++) k = (i * j) + k; } cout << k << endl;}If you output the v...
I understand that typeef or using can be used to simplify the use of function pointers.typedef void func1(int, int);typedef void (&func2)(int, int);typedef void (*func3)(int, int);By the way, I wa...
#include <iostream>using namespace std;float func(float a[]);int main(){ float x[3] = { 1.5, 2.5, 3.5 }; *cout << func(x) << endl;*}float func(float a[]){ float sum = 0; for (int i =...
// Node structuretemplate <typename T>struct Node { T idata; Node<T>* ptr_next; Node<T>* ptr_prev; // Initialization when no value is entered, Node() : idata(0), ptr_next(nullptr),...
class account{private: int accid; int balance; char *name;public: account(int id, int money, const char* a) :accid(id), balance(money) { name = new char[strlen(a) + 1]; strcpy(name, a); } account(c...
I want to configure the screen that appears when I press the Windows Driver Properties window using MFC.Somehow I succeeded in getting information about the type and capacity of the driverI'm at a los...
« | - 86 - | » |
© 2024 OneMinuteCode. All rights reserved.