전체 글 89

Call By Value, Call By Reference

/////////////////////// /////Call By Value///// /////////////////////// #include void func(int n); int main() { int n = 10; //메인함수 메모리의 변수n 에 10 입력 func(n); //func함수 메모리 내의 n안에 20입력 printf("n의 값 : %d\n", n); //메인 n > func함수 | n -> 10 출력 return 0; } void func(int n) { n = 20; } //출처 //https://luckyyowu.tistory.com/9 ./CallByValue n의 값 : 10 /////////////////////////// /////Call By Reference///// /..

C 2021.10.21

C++ 정적바인딩, 동적바인딩

정적바인딩 컴파일 시 이미 정해진 주소 ​ 동적바인딩 컴파일 시 함수를 호출할 때 결정 ​ ​ virtual 붙힐 경우 자식 클래스에 같은 함수가 있으면 자식 클래스 함수 호출 ​ 정적바인딩 //StaticBinding.cpp #include using namespace std; class Parents { public: void myFunc() //자식 클래스에 같은 함수가 있는경우 //부모 클래스의 함수 호출 (virtual 키워드 없음) { cout

C++ 2021.10.21

C++ 상속 관계 구조 구현 (학생 예제)

#include #include #include #include // 배열 5개만 using namespace std; class Student { private: char *student_name; //학생 이름 변수 int computer_grade; public: Student() {} Student(const char *_student_name, const int _computer_grade) //이름 입력받기 위한 생성자 { student_name = new char[strlen(_student_name) + 1]; //NULL문자 포함한 배열 선언 strcpy(student_name, _student_name); //student_name _student_name 입력 //cout

C++ 2021.10.21

springboot로 Rest api 만들기(4) Swagger API 문서 자동화

전체 소스코드 https://github.com/GHGHGHKO/Springboot/tree/main/pepega_chapter_4 GitHub - GHGHGHKO/Springboot: 블로그에 업로드 된 소스코드 블로그에 업로드 된 소스코드. Contribute to GHGHGHKO/Springboot development by creating an account on GitHub. github.com ​ 이전 포스팅에는 H2 Database를 활용하여 GET, POST 방식으로 데이터를 출력하고 도출하는 방법을 진행했었다. ​ 이번 포스팅에는 프론트앤드 개발자가 편하게 참고할 수 있는 문서인 Swagger라는 것을 활용하여 API 문서 자동화를 진행해보려 한다. ​ ​ 시작 ​ ​ build.grad..

SpringBoot 2021.10.21

springboot로 Rest api 만들기(3) H2 Database 연동

전체 소스코드 https://github.com/GHGHGHKO/Springboot/tree/main/pepega_chapter_3 GitHub - GHGHGHKO/Springboot: 블로그에 업로드 된 소스코드 블로그에 업로드 된 소스코드. Contribute to GHGHGHKO/Springboot development by creating an account on GitHub. github.com 전 포스팅에서는 boot를 활용하여 HelloWorld를 GetMapping, ResponseBody로로 출력해보았다. ​ 이번 포스팅에는 SpringBoot에 Database를 연동하는 실습을 포스팅하겠다. ​ Database는 H2 database를 활용할 예정이다. ​ ​ H2 Database H2..

SpringBoot 2021.10.21

springboot로 Rest api 만들기(2) HelloWorld

전체 소스코드 https://github.com/GHGHGHKO/Springboot/tree/main/pepega_chapter_2 GitHub - GHGHGHKO/Springboot: 블로그에 업로드 된 소스코드 블로그에 업로드 된 소스코드. Contribute to GHGHGHKO/Springboot development by creating an account on GitHub. github.com 이전 포스팅에서는 ​ http://start.spring.io/ 위 웹사이트에서 프로젝트를 만들고 실행해보는 실습을 했다. ​ localhost:8080으로 접속하여 서버가 작동하는지 테스트했다. ​ 이번 포스팅에서는 HelloWorld를 만들어보려고 한다. ​ java는 src/main/java 하위에..

SpringBoot 2021.10.21

SpringBoot로 Rest api 만들기(1) Intellij community, start.spring.io

완성된 소스코드 https://github.com/GHGHGHKO/Springboot/tree/main/pepega_chapter_1 GitHub - GHGHGHKO/Springboot: 블로그에 업로드 된 소스코드 블로그에 업로드 된 소스코드. Contribute to GHGHGHKO/Springboot development by creating an account on GitHub. github.com 최근 springboot를 활용하여 백엔드 프로젝트를 진행하게 됐다. ​ 처음부터 학습할겸 프로젝트도 진행할 겸 조금 길 수도 있는 포스팅을 도전하고자 한다. ​ Intellij에서 Springboot2를 실습 프로젝트를 포스팅 할 예정이다. ​ 사전에 로컬 혹은 서버에 java 11 버전이 설치되어있..

SpringBoot 2021.10.21