| | |
Segmentation Fault (Tiny Program)
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
Hi,
I'm getting seg fault in this
I'm sure it is due to the line
I interpret this line as . I would like to hear an explanation on why I can't do this.
Thanks for your time
I'm getting seg fault in this
C++ Syntax (Toggle Plain Text)
#include <iostream> int main() { char *p; *p='w'; std::cout<<p; return 0; }
I'm sure it is due to the line
C++ Syntax (Toggle Plain Text)
*p='w';
I interpret this line as
•
•
•
•
Value at address p = 'w'
Thanks for your time
All suspects are guilty until proven innocent, other wise, they wouldn't be suspects would they?
![]() |
Similar Threads
- memory management in wndows 2000 (Windows NT / 2000 / XP)
Other Threads in the C++ Forum
- Previous Thread: C or C++ equiv. to Python's expanduser, abspath, normpath
- Next Thread: Visual Studio Enterprise C++ 9.0 compatibility
| Thread Tools | Search this Thread |
api array arrays beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion convert count data database delete desktop developer directshow dll download dynamic email encryption error file forms fstream function functions game generator getline google graph gui homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux loop looping loops map math matrix memory multiple news node number output parameter pointer problem program programming project proxy python random read recursion recursive return sorting string strings struct template templates test text text-file tree unix url vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






