#include "stdafx.h"
#include "iostream"
using namespace std;
class PHANSO()
{
private: int tu,mau;
public:
void nhap();
{
cout<<"nhap tu so vaf mau so";
cin>>tu>>mau;
}
void xuat();
{
cout<<"phan so co tu la: "<<tu<<"\n phan so co mau la: "<<mau;
}
}
int main();
{
int a,b,c;
PHANSO a1,b1;
cout <<"chao mung ban den voiw c++ \n";
a1.nhap;
b1.nhap;
a.xuat;
cout <<"chao mung ban den voiw c++ \n";
cout <<"nhap hai so a,b \n";
cin>>a>>b;
c=a+b;
cout<<"tong hai so a b laf: "<<c;
system("PAULES");
return 0;
}
code neya bao loi la:
'hung11111.exe': Loaded 'C:\Users\user\Documents\Visual Studio 2010\Projects\hung11111\Debug\hung11111.exe', Symbols loaded.
'hung11111.exe': Loaded 'C:\Windows\System32\ntdll.dll', Symbols loaded (source information stripped).
'hung11111.exe': Loaded 'C:\Windows\System32\kernel32.dll', Symbols loaded (source information stripped).
'hung11111.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Symbols loaded (source information stripped).
'hung11111.exe': Loaded 'C:\Windows\System32\msvcp100d.dll', Symbols loaded.
'hung11111.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded.
'hung11111.exe': Loaded 'C:\Windows\System32\apphelp.dll', Symbols loaded (source information stripped).
The program '[6964] hung11111.exe: Native' has exited with code 0 (0x0).
sao em khoong chay duoc class
#include "iostream"
using namespace std;
class PHANSO()
{
private: int tu,mau;
public:
void nhap();
{
cout<<"nhap tu so vaf mau so";
cin>>tu>>mau;
}
void xuat();
{
cout<<"phan so co tu la: "<<tu<<"\n phan so co mau la: "<<mau;
}
}
int main();
{
int a,b,c;
PHANSO a1,b1;
cout <<"chao mung ban den voiw c++ \n";
a1.nhap;
b1.nhap;
a.xuat;
cout <<"chao mung ban den voiw c++ \n";
cout <<"nhap hai so a,b \n";
cin>>a>>b;
c=a+b;
cout<<"tong hai so a b laf: "<<c;
system("PAULES");
return 0;
}
code neya bao loi la:
'hung11111.exe': Loaded 'C:\Users\user\Documents\Visual Studio 2010\Projects\hung11111\Debug\hung11111.exe', Symbols loaded.
'hung11111.exe': Loaded 'C:\Windows\System32\ntdll.dll', Symbols loaded (source information stripped).
'hung11111.exe': Loaded 'C:\Windows\System32\kernel32.dll', Symbols loaded (source information stripped).
'hung11111.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Symbols loaded (source information stripped).
'hung11111.exe': Loaded 'C:\Windows\System32\msvcp100d.dll', Symbols loaded.
'hung11111.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded.
'hung11111.exe': Loaded 'C:\Windows\System32\apphelp.dll', Symbols loaded (source information stripped).
The program '[6964] hung11111.exe: Native' has exited with code 0 (0x0).
sao em khoong chay duoc class
Comment