Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- virtual function
- return by reference
- virtual inheritance
- delete function
- constructor
- C++
- std::ostream
- conversion constructor
- 더 지니어스 양면포커
- discord bot
- this call
- new&delete
- vector size
- dynamic_cast
- placement new
- std::cout
- operator overloading
- pointer to member data
- suffix return type
- std::vector
- vector capacity
- member function pointer
- virtual function table
- c++ basic practice
- diamond inheritance
- virtual destructor
- base from member
- increment operator
- std::endl
- c++ multi chatting room
Archives
- Today
- Total
목록static_cast (1)
I'm FanJae.

※ 본 포스트는 코드누리 C++ Basic 강의 내용을 보고 정리한 포스트입니다. 1. C언어 캐스팅의 문제점 - Explicit Casting기본적으로, C언어의 캐스팅 방법과 C++ 언어의 캐스팅 방식에는 약간의 차이가 존재한다.int* p1 = (int *) malloc(sizeof(int)*10);int* p2 = static_cast(malloc(sizeof(int)*10));- C++ 언어로 넘어오면서 아래 방법을 더 권장하기 시작했다. C 방식 캐스팅의 문제점#include #include int main(){ int* p1 = (int *)malloc(sizeof(int)*10); free(p1); int n = 10; double* p2 = &n; *p2..
C++/Basic
2024. 8. 11. 16:19