본문 바로가기

카테고리 없음

declaration and initialization

#include "stdafx.h"

#include <iostream>

#include <string>


int main()

{

using namespace std;


int num(5);

string str("초기화");


const int *ptr = 0;


ptr = new int(5);


cout << *ptr << endl;


delete ptr;


return 0;

}