The only two members I still recognize are Salem and laserlight. Good to know you're still in the game. :)
No questions... just decided to poke my head in here after several years' absence.
sf
Type: Posts; User: spongefreddie
The only two members I still recognize are Salem and laserlight. Good to know you're still in the game. :)
No questions... just decided to poke my head in here after several years' absence.
sf
What textbook/course produced these kinds of arcane directions?
Excellent question and observation! I initially learned C so that I could create my own text adventure (with "real-time" fighting and other non-standard features - it's still a work in progress,...
Feeling a bit entitled, are we? lol
Muzgi, I had this problem in my first textbook! Ahh, memories... :)
I agree with the other posters; the knowledge you seem to be missing here is how arrays work and how the indirection operator references element values. The best place I personally know of to read...
You are requesting help with C++ code in the C forum. While there is a solution in C, is this what you meant to do?
I apologize. Believe it or not, I was ignorant of that rule. It won't happen again.
I mistakenly thought that the comments I included would be instructive, as they explained the reasons for my...
Sorry about the dual replies; I attempted to edit my post and the server stopped responding. When the server's flatulence was finished, I was rewarded with two permanent posts, and an inabilty to...
Here's how I made it work in code::blocks:
/* A simple program in which the user picks 2 numbers and does mathematical operation ( +, -, * or / ) */
#include <stdio.h> //this is all...
Here's how I made it work in code::blocks:
/* A simple program in which the user picks 2 numbers and does mathematical operation ( +, -, * or / ) */
#include <stdio.h> //this is all...
Re: the string literal... I thought that initializing a character array string literal (as opposed to initializing a pointer-to-char string literal) made modification of individual array elements...
Thanks for this info!!! I think I need to make some adjustments to my debugger messages, so they include notification of segmentation faults. I actually agree with all of you; I'd rather be using...
Here's the same program, with altered code, as per suggestion by AndrewHunter and tabstop.
Now, here's why I'm still puzzled: when I run the program, again, everything seems to do what it's...
My modus operandi is to keep re-reading the chapter and testing new ideas with the compiler until I finally get it right. Then I always document the struggle so that I never forget it. I have to hit...
Thanks for your input.
tabstop, I'm not trying to argue with you, I'm just trying to understand: why does beany.str print out the string that originally came from testing, if the allocated space isn't large enough, and...
I'm not sure if that's because I haven't gotten to the chapter on strings yet (that's 16, and I'm on 8), or if my textbook is too old (pub. 2002). The skeleton the book provided contained the...
While I'm scrambling to figure out how I screwed this up, could you tell me if the following code would be a better way to allocate the proper space:
char * space = new char[x.ct];
I'm...
Hi Folks,
Can anyone tell me why this console program errors out *after* it has correctly performed both of the show() functions? The program compiles without error or warning, which is why I...
Thank you for that clarification. I was mistakenly thinking that the memory's data would be reset with *different* garbage values, for some crazy reason.
I figured that trying to print structure members after the memory was freed was a no-no, since doesn't the status of the pointed-to location become undefined at that point? I was just peeking under...
Hi everyone! I finished up my C programming book back in December, then took a break. I'm back and studying C++ now, and this is my first question.
I completed the exercise successfully, in terms...
Thanks for all your great work!!! :)
Just wondered what the current status is... The search function still can't find any of my posts or threads (searching by my user name).