gcc4.1.2 and 4.3.2 has different default behavior

2011-03-08 Thread Yixuan Huang
Hello All, I have encountered one issue when write a simple test code. #inlcude iostream int main{ const char* str = ; std::coutstr len: strlen(str)std::endl; return 0; } If I compile on gcc version 4.1.2 20070115 (SUSE Linux), it can be compiled successfully. Otherwise, on gcc version

gcc 3.2 compile issue when initialize value

2010-05-20 Thread Yixuan Huang
Hello, I wrote following code: #include iostream #include string #include dirent.h int main() { struct dirent **namelist; int numberOfProcDirs; numberOfProcDirs=scandir(/proc, namelist, 0, alphasort); //std::string temp(std::string(namelist[0]-d_name)+std::string(fdsfds)); //std::string