Beginners - October 2010 (Page 4)

Loop going crazy
 
/* * book.cpp * *Simple program for storing array of book titles and published dates * * Created on: Oct 9, 2010 * Author: Alpha */ #includ...
[1 reply] : 'cin >>' leaves a newline char in the input stream. This '\n' is then ... (by hamsterman)
Problem declaring data member in a class of a template class
 
Hey guys, I think it would be alot easier to show you rather than explain what's happening. Class code: class eResource { public: template <class ...
[1 reply] : You've got an extra } in line 34. In order to define the static attr... (by ne555)
Program repeats a statement when it shouldn't
 
I'm still extremely new to c++, and I'm having the most annoying trouble with this program I just wrote. #include <iostream> #include <stdlib.h> #include <s...
[14 replies] Last: Okay, I think I understand now. So I wont use a function in this progr... (by agent 509)
Read file (Extract string by spacing)
 
I read through the guide but i still can't figure out how to extract a string separated by spacing from a file . Eg txt file: Line No: G-code: X-coordina...
[1 reply] : Duplicate: http://www.cplusplus.com/forum/beginner/30722/ (by Galik)
Read file (Extract string by spacing)
 
I read through the guide but i still can't figure out how to extract a string separated by spacing from a file . Eg txt file: Line No: G-code: X-coordina...
[1 reply] : Duplicate: http://www.cplusplus.com/forum/beginner/30722/ (by Galik)
Read file (Extract string by spacing)
 
I read through the guide but i still can't figure out how to extract a string separated by spacing from a file . Eg txt file: Line No: G-code: X-coordina...
[1 reply] : You can use operator>> http://www.cplusplus.com/reference/iostream/is... (by Galik)
Primality program
 
This is what I need help with: Prompt the user for an integer then output "prime" if the number is prime or "composite" is the number is composite. Then output...
[5 replies] Last: wow thank you so much! that worked perfectly! (by johnny157)
Cannot Convert Const String to Char*
 
I keep getting this error. What does it mean, and how can I fix it? The error: AddressBook.cpp:11: error: cannot convert ‘std::string’ to ‘char*’ f...
[2 replies] Last: Thank you! (by snazziosity)
Converting English to Morse Code - Logic Debugging
 
Hello all, I have a fairly simple problem with a program I am writing that converts an English statement into Morse code. The problem I am having is the relatio...
[3 replies] Last: Just for closure, I actually found a solution using the <sstream> libr... (by zachwulf)
by Tolmes
Arrays and functions...
 
I was assigned this program, and I can't even get started on it I am so confused. I need to take info from a text file entitles cities.txt then display it and s...
[1 reply] : Each array has the capability to hold 30 elements, however, that does ... (by Tolmes)
by gob
implementing a class error - simple!
 
Hello All, I have a very simple class but I cannot create a object from it. This is the error I get when compiling: >gmake g++ -ggdb -c Event.cpp g++...
[4 replies] Last: Thanks! (by gob)
Passing Arrays By Reference
 
I am absolutely HORRIBLE at passing functions, and even more so with passing arrays. I'm trying to pass my "grades" array to the other functions, but I know I h...
[3 replies] Last: I didn't say they're passed by default, I said they're by default pas... (by Albatross)
returning to the beginning of fstream
 
I have an issue going back to the beginning of the fstream I have opened. I use my first pass over the file to count the lines in the file, so that I could cre...
[2 replies] Last: Hi Bazzy, the call didn't work when alone, but when used together..... (by keewong)
C++ Compiler
 
Does anyone know of a good C++ compiler that does not require installation? I need to be able to use it from my home filespace at school. If there are any onlin...
[10 replies] Last: The Code::Blocks + TDM MinGW bundle does not require admin rights to i... (by Athar)
by sk1tz0
inheritance question
 
hey guys, i have a project with "Time.h" "Date.h" and "Appointments.h" along with their corresponding .cpp files...within time i have set and get functions for ...
[4 replies] Last: This looks a bit fishy: Appointments::Appointments(Date d, Time t)... (by Galik)
Reading from file into array
 
I have a text file with ten numbers only separated by spaces. I'm trying to read these values in the text file into an array in my program. What's the best w...
[3 replies] Last: either int* read(){ int* grades = new int ; //... return... (by hamsterman)
Vectors and files, Problem with erasing elements
 
I have a problem with a part of a program I've been working with. The menu allows the user to 1.Show the names that are written in a txt, 2. Remove a name, and...
[no replies]
by edcofu
DOS RPG!
 
heres my first program written in c++, and i want to know ur opinion about it: http://forum.cheatengine.org/viewtopic.php?p=5120105 its a simple RPG for...
[14 replies] Last: i too develop text based rpg games, telnet://azonebbs.dyndns.org (by dspain)
cant get Error to stop showing..
 
Ever time I input the Exp it just displays the error message? this is driving me crazy... * Input Base number * WHILE base is not quit * ...
[2 replies] Last: void main() is non standard, although it's allowed by some compilers... (by filipe)
returning a long decimal number
 
I am trying to find the percentage of white pixels in an image: I have the total pixel value and the white pixel value and my code is: long double percent...
[2 replies] Last: Ahhh, I see! Thank you ever so much, it is working now :D (by soapyFrogger)
October 2010 Pages: 123456... 42
  Archived months: [sep2010] [nov2010]

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