#include <iostream>
using namespace std;
네임스페이스 <- 헷갈리지 말라고
int main()
{
int numberOfLanguages;
}
메인 함수
// syntax
typeName VariableName = 10;
declare 만 하고 initialize 하지 않으면 -> undefined 나옴
int count = 0 ; 하라고
casting / explicit type conversion
따로 타입 바꿔주면 됨
const int NUMBER_OF_STUDENTS = 24
\
\
, \ㅅ
, \\
, \"
, \'
계산 지대로 하려면 ".0" 더하면 된다. 그러나 이게 끝이 아니고
Implicit conversion : 자동으로 됨
Explicit conversion : 개발자가 함
++
--
someVar++
: post-increment : 계산 후 원래 변수에 (+1) reassign++someVar
: pre-increment : (+1) reassgin 후 계산하려면
#include <iostream>
, using namespace std;
해야 함.
\n
. <<endl;
해도 됨#include <string>
해야 선언 가능 ㅋㅋcin >> str
하면 공백문자 까지만 들어감.
하면 그대로 그 전까지 입력됨"Magic Formula" to force decimal sizes:
cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout.precision(2);
중략
//
, /* */
ALL_CAPS
lowerToUpper
<- snakeCase 말인듯?#include <Library_Name>
std
사용