This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 혼자 연구하는 C/C++의 도우미 헤더 파일 | |
// 비주얼 C++ 환경에서 터보 C 스타일의 함수를 정의한다. | |
#ifndef TURBOC_HEADER | |
#define TURBOC_HEADER | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <conio.h> | |
#include <time.h> | |
#include <windows.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
class Food { | |
public : | |
virtual void SetPrice(int myprice) = 0; //순수 가상함수 | |
int GetPrice(){ | |
return price; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
class Jack2Box{ | |
public : | |
Jack2Box(){ | |
cout << "Jack2Box 오브젝트 생성" << endl; | |
} | |
~Jack2Box(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int sum(int a,int b); | |
int subtract(int a,int b); | |
int multi(int a,int b); | |
int divide(int a,int b); | |
int(*p[4])(int x,int y) = {sum, subtract, multi, divide}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
void increase(void* data, int ptr_size) | |
{ | |
if(ptr_size == sizeof(char)) | |
{ | |
char* ptr_char; | |
ptr_char = (char*)data; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
const char* company = "INetCop"; | |
cout << company; | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int a = 10; | |
cout << "Value a is " << a << endl; | |
cout << "Value &a is " << &a << endl; | |
int* a_ptr = &a; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstdlib> | |
using namespace std; | |
int main() | |
{ | |
char buffer[100]; | |
float price; | |
int quantity; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
class superstar | |
{ | |
public: | |
char skill; | |
int passion; | |
int communication; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main(){ | |
int soo; | |
do{ | |
cout << "If you want to exit then you press 1 : " ; | |
cin >> soo; | |
} while(soo != 1); |