| | |
segmentation fault, recursive palindrome
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
•
•
thanks for the added help man. Just one question though, whats the point of post-incrementing if pre-incrementing is instantaneous? also did you see any tell tale signs that led to my segmentation faults?? thanks again, and no matter if you didn't see any, you've wasted enough time on this already lol.
edit: working perfectly!!! thanks everyone.
C++ Syntax (Toggle Plain Text)
x++ ; //or ++x;
C++ Syntax (Toggle Plain Text)
p = x++; //or p = ++x;
As I mentioned earlier, to be absolutely clear what you're doing in your function call, just use
index-1 as the argument, as you're not really seeking to change the value of index, just passing a value that is one less.I didn't get any seg fault or other runtime error with your original code, just incorrect result.
Time is never wasted when it's spent helping someone learn something.
(hmm, might make that my new sig)
Everyone's gotta believe in something. I believe I'll have another drink.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
![]() |
Other Threads in the C++ Forum
- Previous Thread: trouble with files
- Next Thread: How to get the Info form a Text Box to cpp file
Views: 1383 | Replies: 10
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file format forms fstream function functions game generator getline givemetehcodez graph iamthwee ifstream image input int java lib loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg sort sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






