[PHP]
// PointerTOClass.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <conio.h>
using namespace std;
class student{
private:
char *Firstname;
char *Lastname;
public:
student();
};
student::student(){
Firstname = new char;
Lastname = new char;
cin >> Firstname >> Lastname;
}
int _tmain(int argc, _TCHAR* argv[])
{
student *N= new student[5];
for (int i=0;i<5;i++){
N[i];
}
system("pause");
return EXIT_SUCCESS;
}
[/PHP]یکی اون قسمت داخل حلقه For توی Main رو توضیح بده یعنی چی؟
وقتی شی درست میکنیم باید سازنده صدا زده بشه. این در مورد آرایه صدق نمیکنه؟
کلا اون یه تیکه یعنی چی؟