이게 왜 안돼지? - dc App
되야되는거 맞음? 설명 계속 저런식으로 하는데.. 그리고 저러면 p1라고 p2하고 주소가 같은거님 다른거임? - dc App
되야될꺼같은데?? p1하구 p2는 다르지 p1은 데이터영역 가리키고 p2는 로컬스택일텐데 - dc App
그럼 p1 선언하는 줄에서 p1은 문자열이 저장되있는 주소라는데 어디에 저장되있는거임?? 랜덤임? - dc App
콤파일러가 정해줄꺼같은데? 데이터 영역에 저문자열 저장해놓고 주소 알려줄듯 ㅎㅎ - dc App
그게 뭔소리인지 모르겠는데.. 다른거임?? - dc App
https://en.cppreference.com/w/cpp/language/string_literal
In C, string literals are of type char[], and can be assigned directly to a (non-const) char*. C++03 allowed it as well (but deprecated it, as literals are const in C++). C++11 no longer allows such a
assignments without a cast
무슨말인지 모르겟지만 const 붙이니 됨 - dc App
cpp c발롬ㅋㅋㅋ - dc Cpp
먼소리임 - dc App
.c
소스.cpp 교수님건 소스.c - dc Cpp
이게 왜 안돼지? - dc App
되야되는거 맞음? 설명 계속 저런식으로 하는데.. 그리고 저러면 p1라고 p2하고 주소가 같은거님 다른거임? - dc App
되야될꺼같은데?? p1하구 p2는 다르지 p1은 데이터영역 가리키고 p2는 로컬스택일텐데 - dc App
그럼 p1 선언하는 줄에서 p1은 문자열이 저장되있는 주소라는데 어디에 저장되있는거임?? 랜덤임? - dc App
콤파일러가 정해줄꺼같은데? 데이터 영역에 저문자열 저장해놓고 주소 알려줄듯 ㅎㅎ - dc App
그게 뭔소리인지 모르겠는데.. 다른거임?? - dc App
https://en.cppreference.com/w/cpp/language/string_literal
In C, string literals are of type char[], and can be assigned directly to a (non-const) char*. C++03 allowed it as well (but deprecated it, as literals are const in C++). C++11 no longer allows such a
assignments without a cast
무슨말인지 모르겟지만 const 붙이니 됨 - dc App
cpp c발롬ㅋㅋㅋ - dc Cpp
먼소리임 - dc App
.c
먼소리임 - dc App
소스.cpp 교수님건 소스.c - dc Cpp