
——stackoverflow——
文章平均质量分 92
witnessai1
初学者的无知在于未学,学者的无知在于学后
展开
-
Can a local variable's memory be accessed outside its scope?
up vote806I have the following code.int * foo(){ int a = 5; return &a;}int main(){ int* p = foo(); cout *p; *p = 8; cout *p;}And the code is just ru原创 2015-10-18 12:47:21 · 474 阅读 · 0 评论 -
Does #include affect program size?
Question:When my cpp file uses #include to add some header, does my final program's size gets bigger? Header aren't considered as compilation units, but the content of the header file is added to原创 2016-09-15 14:49:24 · 302 阅读 · 0 评论