Author Topic: Segmentation Fault  (Read 3367 times)

Bevo

  • Guest
Segmentation Fault
« on: January 06, 2007, 08:40:55 pm »
I'm not really sure if I should post problems that I am having as a result of my code here or in the help forum (the help form seems like its mainly for help with code::blocks issues, like instalation and compatability).  In any case I keep getting a segmentation fault error in my code whenever I try to "std::cout someString;" or do "somestring = someValue;" where someString and someValue are both of type std::string.  The variable someString resides in a class I've defined which contains a constructor that should initialize it.  For some reason however it looks to me as though it is not actually initializing this variable.  I printed out &someString and did receive an address back (0x22ff30), which I do not believe is an invalid address, but I'm not sure on that either.  I read up a bit on trying to debug this kind of error, but I still haven't been able to figure this out.  Anyone have any information that could help me with this?

Feel free to request more information if needed.
« Last Edit: January 06, 2007, 08:43:07 pm by Bevo »

Offline Phatency

  • Multiple posting newcomer
  • *
  • Posts: 65
Re: Segmentation Fault
« Reply #1 on: January 07, 2007, 03:48:34 am »
A complete piece of code would be nice. Can't really be sure if that's what you're doing, or if that's what you think you're doing. (by the way, this isn't really a general programming board, and I doubt this is a codeblocks issue. Though personally I enjoy helping people out.)