C++ 기본 개념

강효림·2023년 5월 14일
0

c++

목록 보기
1/8

c++의 기본 구조

#include <iostream>
using namespace std;
int main()
{}

c++은 <iostream> 을 사용
using namespace 에 있는 std함수를 기본적으로 사용

출력하는 방법

#include <iostream>
using namespace std;
int main()
{
	cout<<"Hello World"<<endl;
}

using namespace std 없는 버전

#include <iostream>
int main()
{
	std::cout<<"Hello World"<<std::endl;
}

일일이 cout의 출처, endl의 출처인 std::을 붙여야함.

0개의 댓글