Skip to content

Instantly share code, notes, and snippets.

View Jack2's full-sized avatar

JAEKI KIM Jack2

View GitHub Profile
@Jack2
Jack2 / namespace_ex.cpp
Created October 30, 2012 21:24
[C++]using_namespace_ex
#include <iostream>
using namespace std;
int main()
{
cout << "namespace example\n";
return 0;
}
@Jack2
Jack2 / cstdio.cpp
Created October 27, 2012 02:00
[C++]cstdio.cpp
#include <cstdio>
void main()
{
printf( "hello" );
}
@Jack2
Jack2 / iostream.cpp
Created October 27, 2012 01:58
[C++]iostream vs iostream.h
#include <iostream>
int main() {
std::cout << "Hello\n";
return 0;
}
@Jack2
Jack2 / sample_c.cpp
Created October 26, 2012 18:39
C++가 보이는 그림책 - C vs C++ 간단한 예제
#include <stdio.h>
main()
{
printf("Hello\nWorld!\n");
}
@Jack2
Jack2 / [C++]page103_ex.cpp
Created October 26, 2012 14:51
C++가 보이는 그림책 - page.103 예제 vs page.104 예제
#include <iostream>
using namespace std;
struct Person {
char name[50] ;
int age ;
} ;
// 책에서 참조에 의한 전달이라고 표기되어 있음
void PrintPersonRef(const Person &psn)
#include <iostream>
#include <string.h>
class Job {
public:
int salary;
char company[8];
};
class Feature {
public:
@Jack2
Jack2 / [C++]compile_err_01
Created October 24, 2012 16:56
[C++]compile_err_01
#include <iostream>
#include <string.h>
class Job {
public:
int salary;
char company[];
};
class Feature {
public: