| | |
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 based beginner binary c++ c/c++ calculator char class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game getline givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news number output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






