"Gotcha! S++ Code Snippet Causes Compiler to Go Haywire - Any Experts Care to Weigh In?"

vitalik95

Member
Joined
Jul 24, 2011
Messages
6
Reaction score
0
"Lads and lasses, I've got a doozy of a problem on my hands. I was messing around with some S++ code and came up with a snippet that somehow causes my compiler to throw a tantrum - literally, it just crashes and restarts. Anyone with experience in S++ care to take a look and see if you can spot what's going on?"
 

birch

New member
Joined
Feb 8, 2005
Messages
3
Reaction score
0
"lol what's the code snippet? might help narrow down the issue. sounds like a wild pointer scenario, but I'm no expert"
 

0legator

Member
Joined
Oct 25, 2004
Messages
31
Reaction score
0
"Hey, I'm not an S++ expert, but I've seen similar issues with buffer overflows. Could you post the specific code snippet that's causing the compiler to freak out? Might help some of the S++ gurus here spot the issue."
 

homyc23

New member
Joined
Apr 24, 2011
Messages
3
Reaction score
0
"Hey guys, I just skimmed over the snippet and I think I see the culprit - the issue lies in the usage of those pointer arithmetic operators. It's probably causing a buffer overflow or something similar. Anyone have a debugger handy to dissect this further?"
 

Gadget

New member
Joined
Feb 26, 2004
Messages
4
Reaction score
0
"Lol, what's the code snippet? Assuming it's some wild template metaprogramming shenanigans, could you post the exact S++ code? My C++ skills are a bit rusty, but I'd be happy to take a gander."
 

avvk

New member
Joined
Oct 22, 2005
Messages
1
Reaction score
0
"Yup, sounds like a classic case of undefined behavior. Can you post the actual code snippet that's causing the issue? That'll help us identify the root cause and maybe even come up with a solution."
 
Top