I read it but did not attempt it because I wanted to avoid C++0x, since I have never used it before. Also, I assumed solving a somewhat basic problem like my own was already solved using more...
Type: Posts; User: nair
I read it but did not attempt it because I wanted to avoid C++0x, since I have never used it before. Also, I assumed solving a somewhat basic problem like my own was already solved using more...
I probably don't know what I am talking about since I am such a beginner, but I'm just gonna take a shot in the dark anyway, and hopefully be enlightened or proven wrong (or both). Upon doing more...
I've got a class ("ParentClass") which has several private attributes, one of those being an array of type "ChildClass". All I need is a method which can return the array contained within the...
You are correct. Every flag in my "Compiler Settings" was unchecked.
Don't know why the compiler doesn't complain about that. Somehow, integer datatypes actually work perfectly in the code as written.
The correct code, as you mentioned should be:
std::string...
I have ended up running into a specific problem in my own C++ project which is now crashing (throwing a segmentation fault error). I have created an entire project, which I have pasted below, which...
If I define object B as an attribute of object A, must I always define it as a public member in order to use it? If it is defined as a private member, I cannot go to that attribute directly and use...
While sticking with the theme of having private data members and public methods within all of the objects that I create programming, I am a bit confused about the topic of encapsulation in the...
I am familiar with the concept of breaking down a really big, complicated function into smaller functions, keeping things simpler and easier to maintain. It's all about "divide and conquer". I know...
Yes, I already configured my main SDL libraries and tested that they worked properly in lessons 1 and 2. Also, I figured out my problem. Under "Global Compiler Settings" > "Linker Settings" tab >...
Having just begun the Lazyfoo SDL tutorials, I am stuck on lesson 4. It is the first lesson in which the user actually tests whether or not they configured their IDE and their executable to use the...
Thanks for the reply, I'm gonna go try exactly what you recommended and see where I end up.
Also, for anyone out there who is looking to do the screensaver approach, I discovered that the source...
I was just recently thinking a great way to get started doing this would be to find some open source screensavers out there and try and figure out how they work or how to modify them. I would...
Regarding the screensaver concept, I am not necessarily trying to make something that is intended to be used as a screensaver, meaning that it would necessarily preserve the screen, be energy...
I have been researching how to create a very basic GUI application in C++ with the intent of eventually making a basic game, such as pacman or tetris. I have a lot to learn about C++, and I have...
What guidelines do you guys follow for structuring and formatting your C++ code in general? Have you guys spent a lot of time looking at other people's code and attempting to mimic their style? ...
Ahhh...I was trying to use text files with names that had spaces in them. That's the issue. Thank you for spotting that and informing me.
Ya I can open up all of the text files and edit them.
What I meant to articulate more clearly was that...when I attempt to run this program using certain specific text files as input, the else statement of my program runs and the "Unable to open file"...
That did not change the behavior of the program given the input text files I have been using. For some reason, with these particular input files, certain ones still will not open successfully, even...
I am using this code to accept a filename of a text file input from the user which will parsed line by line. It takes a line of text and assigns it to an array element "line", and goes through the...
You're right. What are those first three characters?
10257
Just tried it in VS2010, and had exactly the same output. I am expecting the output to be:
and not
Not likely to just be a problem with my IDE.
I'm using Dev C++. I had heard that it was ancient, maybe it is causing me this problem.
I have just become familiar with substr. I had been using it successfully the past couple days until I ran into this first problem, and now I have begun to question if I actually know how it works. ...
I've got this code which parses a text file by reading through and assigning each individual string to a variable (an element in the 'holder' array). It is based mostly off of some code I found on...