#include <iostream>
//using namespace std;
//using namespace A;

int x=200;
namespace B
{
//using std::cout;
//using std::endl;
using namespace std;

inline void foo() //함수를 호출하는 곳에서 바로 실행하게 해줌. 메모리 할당 X,메모리 절약 실행속도 업
// 단점 함수에잇는 내용이 많아지면 
{
/*cout.operator << (10);
cout <<"1" << endl;
cout << 10 << 29 << "aa"<<'X'<<3.14<< endl;

int x;
cin >> x;
cout << x<< endl;
*/
//int x=100;
//cout << ::x << endl;
/*
float f = 3.14;
int x = int(f);

cout << x << endl;
*/
cout<<"XXXXXXXX"<<endl;
cout<<"XXXXXXXX"<<endl;
cout<<"XXXXXXXX"<<endl;
}
}
//태그가 타입으로 승격
//구조체 태그로부터 변수를 바로 선언할수 있다.

struct BOOK
{
int price;
int page;
};

void main()
{
//B::foo();
BOOK *p1 = (BOOK *)malloc(sizeof(BOOK)*10);

free(p1);
}

//함수 오버로딩
//구조체


+ Recent posts