Beginners - May 2012 (Page 44)

Program using getline doesn't work after something is already input?
 
I made a program using getline that works fine. When I copied that program, word for word, semicolon for semicolon, it doesn't work anymore. I'm assuming that t...
[4 replies] Last: Thanks, it works now. From now on, I will use cin.ignore(); ... (by Gregory Sakas)
problem with variable type converions
 
Im writting a program that allows the user to create a password that is encrypted to a text file. So far, I can create a password and guess it correcetly/incorr...
[6 replies] Last: Sounds like a lot of if statements... thanks for the help. I'll keep y... (by pholotic)
I need help with this program
 
write a program that will have a visual interface for a student info system that will record a student ID, first name, middle, intial, last name, DOB, phone #...
[1 reply] : What part do you need help with? (by Zhuge)
by Aytzz
Pointers
 
I'm following the tutorials on the site and I got to pointers. // more pointers #include <iostream> using namespace std; int main () { int firstvalue = 5...
[4 replies] Last: doh, even though this is already resolved, I made a diagram to show it... (by Disch)
What do I actually write in?
 
Hello, I have just started looking in to programming. I am trying to write my "Hello World" program but I don't understand which software to use. I have been...
[9 replies] Last: Ok well I am on a MacBook. I have tried downloading a Code::Blocks lin... (by jmustudent5)
Program hangs at bitwise multiplication function
 
Hello all! So I'm doing a homework question asking me to code some Egyptian division, but that's not what I need help with. The problem is that I am only allo...
[2 replies] Last: Wow, don't know how I ended up with that! Thanks for looking through ... (by Cameron Basham)
How do i make this a function?
 
Currently working on a project that is supposed to create an insert sort linked list, then through an option in a switch function, return the list. Here's what ...
[no replies]
User input array problems
 
I am being asked to take the average of an array that is supposed to be populated by the user. I have already setup the averaging function and am just having a...
[2 replies] Last: for(int i = 0; i < size - 1; i++){ cin >> arr ; } ... (by ResidentBiscuit)
Reading file into dyn. array
 
Hi Im having trouble with the syntax to store data from a file into a dynamic array, for example, if i had a data file with the following: 1 2 3 4 5 an...
[no replies]
Template function within template class
 
Hello All, I'm guessing I'm making some sort of rookie mistake here. Basically, I have a class with template member functions, but I feel my class is not recogn...
[no replies]
searching a text file for a string
 
Hi, I want to find a certain line in a text file. The text file looks like this: hi=hi! bye=bye! how are you doing=good! I am using getline(). H...
[8 replies] Last: Start over at the beginning of the file every time you have a new sear... (by cire)
Overloading insertion/extraction operators
 
Good evening! I am in an introductory C++ programing class working on a project that I am having some troubles with. I am having trouble overloading the i...
[no replies]
calculate percentage of reps
 
Hi everyone, I am new here. I've been doing c++ for 2 years now and for some reason I cant figure out why the percentage for each party is giving me 0 for the a...
[3 replies] Last: Don't worry, even the best make mistakes. (by paulthepenguin)
1337 translator program (File I/O)
 
Here's the directions: http://tinyurl.com/7b8yltp Basically, you need to read in text from one file and output to another file, except translated to 1337. I...
[3 replies] Last: I'm not really sure I can help much short of giving you the answer, bu... (by paulthepenguin)
struct help
 
I have the following program below I have the output but i dont know how to get it. The out put gives the names Jane Doe and Joe Public along with their GPA's p...
[6 replies] Last: it is we just need to understand the concept. We dont need to get an o... (by JCharles)
A* Pathfinding. Almost works 100%(SDL)
 
Hi So i just finished a semester of C++. For my final project i attempted an implimentation of the A* pathfinding algorithm. It almost works 100% except in...
[2 replies] Last: I actually re-wrote alot of the code, made it more efficient, and than... (by zertech)
Converting a int to a char
 
Hello! I've run into a problem when I'm trying to insert an int into a string. I'm using the string::insert()-method for this which only accepts a char argu...
[8 replies] Last: What if he wanted to insert at a certain pos in string. Another examp... (by Damadger)
Need Help With HomeWork
 
Recently I missed class so now I am confused with the homework. Can someone point me in the right direction for these problems? TY 1.Read in a list of 10 n...
[3 replies] Last: You are welcome. (by paulthepenguin)
How can I have a user input spaces?
 
In c++, I want a user to be able to enter an entire phrase, spaces and all. I know using a string doesn't work. What would work?
[2 replies] Last: string do work but with the aid of getline so if you do it like this... (by ozone)
by DSaba
invalid types `int[int]' for array subscript
 
I am calling this function and receiving the error "invalid types `int ' for array subscript" float Average(int grades) { float total=0; for ...
[3 replies] Last: Thank you both for your help. I should have posted the entire code I w... (by DSaba)
May 2012 Pages: 1... 4243444546... 59
  Archived months: [apr2012] [jun2012]

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