Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard, raimo
Alvaro wrote:Oh!
Well, to your first question, I am guessing you used "\012345...", which will be interpreted as '\012' followed by '3', '4', '5', ... The solution is using `\000' instead of just `\0'.
To your second question, I don't think the trick with the '\b's is valid, since it depends on the terminal behaving in a particular way that is not very standard (as you could feel yourself).
marcdan221 wrote:Hi all,
I just couldn't resist to give it a try(Sudoku contest) right before going to bed yesterday. I guess i'm a late a little but i have my algorythmn already and it's working great
(randomly generated each time I run it). I just need to ajust it a bit.
Anyways, I was wondering what you mean by "token". How do I count how many token my program uses.
Thanks.
A token is the smallest element of a C++ program that is meaningful to the compiler.
Beer Hunter wrote:It's 171 tokens now, but the contest still goes for another week or so…
EDIT: Or does it? I just noticed Darryl's post on the previous page. Here's my solution.
No, it doesn't allocate memory for that — it doesn't need to! All the variables involved have their place in the function's stack frame. Loops are equivalent to the use of if statements and gotos (and, no, if statements don't allocate memory either ;-)).Darryl wrote:When you have a loop or a function, isn't "something" push onto the stack and then popped when return? If so how do goto's affect that? Will continuous jumping out of a loop for example cause stack overflows?
Users browsing this forum: No registered users and 0 guests