Beginners - August 2009 (Page 17)

Comparing two strings not working...
 
So what I have is a piece of code like this: int newMessages = 0; for (unsigned int i = 0; i < listToFill.size(); i++) { if (listToFill...
[4 replies] Last: Use if (!strcmp(listToFill .getUnread(), "N")) Your current ... (by webJose)
making alot of the same thing
 
i need to make more than one thing of the same thing. that thing is a ball. so when the user presses space bar it makes a new ball on the screen. i think i can ...
[8 replies] Last: ha sorry i increased the number of balls before i changed everything. ... (by poonninja)
by Zeo
Function in c++
 
Hello. I'm new to this forum so bear with me :D I have a problem with the following program. So far, the only problem I have is when I try to separate it as ...
[1 reply] : hero is a local variable (on the stack). It vanishes when structini()... (by jsmith)
Storing objects (read from file) into vectors
 
So for my comsci assignment, I need to read in this text file with a butt load of messages. Here is what the text file looks like: 1 R Jemma Harry What...
[2 replies] Last: Thanks for the help! Yeah I knew it had to do with the scope, wasn't s... (by iamsmooth)
by Goofy
Separating Interface from Implementation- Dev-C++ error
 
I'm reading the book C++ How to Program 5/e by Dietel. At the Chapter 3.9 'Separating Interface from Implementation' and chapter 3.10 'Validating Data wit...
[6 replies] Last: I can't really say how much I want to thank you. You got me to continu... (by Goofy)
Console Calculator
 
#include <cstdlib> #include <iostream> #include <cmath> #include <string> using namespace std; // Calculator Section float num1; float num2; floa...
[4 replies] Last: Yes, I personally wrote everything you see in my posts. The commentary... (by Duthomhas)
creating a saved test
 
I've got this simple code I've been trying to do for HOURS and I can't figure it out. I aim for the program to be a test creator, not with integers, but with ac...
[10 replies] Last: Ok, thanks, I'm going to save this code for later probably, get back t... (by SomeOneHackedMyName)
queue problem
 
#include <cstdlib> #include <iostream> #include <string> using namespace std; //////////////////////////////////////////////////////////////// //con...
[6 replies] Last: I think your problem is that your program never initializes the array ... (by smilodon)
I Need guidance for Text Extraction (New to C++) (1,2,3)
 
Dear All, I really need your expert advices on my following assignment. I intend to compile a C++ program to read a text file containing a lot of text inf...
[59 replies] Last: You need to define your getline function to work with any new line cha... (by Bazzy)
Exact same code failing?[Unsolved]
 
Hai. I am starting work on a text based adventure game using the console, and working on the rooms atm. I have all the data stored in a text file, which I read...
[no replies]
Friend operator<<
 
I think I got the problem...blind me... Hi, I'm writing a Polynomial class and having a compiler error on accessing private methods. class declar...
[3 replies] Last: i think you use to namespace std; That's the same in terms of the f... (by wmheric)
by dag
newbies
 
need help. this is the situation. i was asked to make a project of bank accounts.this is how it works. user was asked to enter a bank acct,name, deposits and ag...
[11 replies] Last: #include <iostream> #include <iomanip> #include <string> #include <... (by dag)
Calculate the sum of a text file
 
Hi, I need help with a program i'm writting, where the user has to enter a file with numbers, and then after I need to work out the sum of the contents, the big...
[2 replies] Last: Yes, I did, and the answer is 0. When I don't the answer is like 5e-10... (by Ledzepp4eva)
by MiaZas
entering code to a post
 
How do I use the insert code button? it shows code and /code in brackets but where do I actually paste the code into? Thanks!
[3 replies] Last: 1) Be sure to use the autoformat feature or format the code yourself w... (by kempofighter)
by MiaZas
sorting corresponding vectors
 
I am creating an inventory. Each item consists of an item name and number. I have created separate vectors for the name and number. I am trying to use insertion...
[5 replies] Last: Here are some links to a couple of examples that I wrote. http://www.... (by kempofighter)
by JFloyd
Problems with the goto statement
 
#include <iostream> #include <string> using namespace std; int main () { goto test2; string action_string; string deci_string; string shop_st...
[2 replies] Last: Ah. Well, I just threw that in there to test it. I was wanting to skip... (by JFloyd)
Trying to read in multiple lines into a string variable
 
So I have a text file like this: _________________________ Joe Jim Hello Jim, Just wanted to say hello! -Jim EOF Tom Tim Hello Tim, Just wanted t...
[8 replies] Last: Thanks! Append worked, I tried adding strings together but kept gettin... (by iamsmooth)
August 2009 Pages: 1... 151617
  Archived months: [jul2009] [sep2009]

This is an archived page. To post a new message, go to the current page.