General C++ Programming - November 2010 (Page 8)

Phone number
 
Hello I am writing a program that will search a list of names and numbers in a separate text file ie bob smith 555-1234 I am currently stuck on entering the...
[2 replies] Last: The code I have written so far searches a text file that has this info... (by wassabi)
Question about class relationships
 
http://cubeupload.com/files/ea1a29uml01.jpg The UML diagram in the image above shows everything related to my problem. As you can see, there are two classes, "...
[1 reply] : The item that was touched should then add points to the player's scor... (by Disch)
Saving data from derived class in map
 
I have a map of a base class and I'm using it to save all of the instances of the derived classes. When I use it specifying the derived class as the map then it...
[10 replies] Last: @kbw - Oh wow, this shines quite a light on the situation. Looks like ... (by closed account 1yvXoG1T)
linked list
 
I'll try and make this somewhat short. I had an assignment to make a c++ inheritance program that uses 5 headers and 5 cpp's with a main. One header/cpp inherit...
[1 reply] : The only differences between class and struct are: 1) Default inherit... (by jsmith)
Problem about queue
 
Please write the program “Car counting”. The program should create of queue of cars with a different colors. It means cars that arrived to crossroad. Then t...
[3 replies] Last: Same one. (by jsmith)
by Tongie
Recursive to iteration
 
Hi, I need some help on this. I need to convert the recursive version to iteration version using while loop but I just cant get it right. There is something wr...
[1 reply] : [co de]Your code goes here.[/co de] In the iterative version you ar... (by ne555)
How to return to certain parts of the program
 
I have several menus and at the end i would like to set it so the user can select if he wants to go back to a certain menu or even from the beginning, i was try...
[1 reply] : something like int state = 1;//enum would be nice here while(state !=... (by hamsterman)
A sample program in C++... I called it the "Beverage Store"
 
//Beverage Store #include<iostream.h> #include<conio.h> main() { int bev,bill,x,n,tbill,m,ch; cout << "1 - Water for P20." <<endl; cout...
[2 replies] Last: You should validate input, it makes your programs more stable and in t... (by quirkyusername)
by obice
template class with nested iterator
 
Hi everyone, I've been fighting for hours on a problem and can't figure out the solution. Maybe some of you ran into something like this already and can help me...
[2 replies] Last: thanks a lot guestgulkan! that was it. (by obice)
by ag2013
Trouble with integer string in printf()?
 
Lines 26-28 should be printing out digits of the inputted number separated by commas (i.e Input: 2345, Output: Digits of the number: 2, 3, 4, 5) However, my...
[no replies]
getline from file question
 
Does getline() function used on a '.txt' file remove whitespace from the line. i dont think it does but not sure... thanks
[2 replies] Last: ok, thats what i thought...um, instead of a string can you use getline... (by kyle11778)
command argument
 
I have quick question on command line argument. What it is and it's purpose.
[2 replies] Last: thank you. (by bshrestha)
Can't figure out what the fail is
 
okay so i'm making a small version on blackjack and i have the program done but when i go to build it this message comes up. 1>------ Build started: Project...
[4 replies] Last: k i will do that and thank you (by PrincessProgram)
string to char*?
 
Hey everyone this is a portion of a program that i am working on. I used the find_state function earlier in my program to traverse the linked list. I was goin...
[3 replies] Last: Passing a char array using string::data() where a C string is expected... (by filipe)
by eefret
Console Checkers Game on C++ !!
 
Hi, Im in my first year of college and we are introducing the c++ programming, the problem is that my teacher is very severe, and he doesnt explains very well ...
[1 reply] : That sounds like an interesting project. It'd be even more interesting... (by Browni3141)
New seed in every iteration of for()?
 
I have a small problem with rand(). It seems that in every iteration it outputs the same exact numbers... So, what function should i use, so that in every itera...
[2 replies] Last: Thx! (by Nenad Zivic)
by Rycul
Linked list and variable datatypes
 
Hey there, I would like to know wether it's possible to have the nodes in a linked list contain data from just a single type, but be able to obtain any of a ...
[2 replies] Last: Thanks a bunch ne5555! It's working exactly as I wanted now :) (by Rycul)
Seeking an Exotic C++ Progam
 
Hi! 8-9 years ago guys have shown me a program written on C++ or maybe even on plain C. When you look at it, you have an impression it won't compile because th...
[3 replies] Last: Thank you! That's definitely it! "Obfuscated" was certainly the righ... (by vonhake)
I'm having problems with FFT
 
Hi guys, Would someone be nice enough to convert this C code to C++ code for me? I don't know how to deal with Python so I had difficulty doing the conversio...
[no replies]
November 2010 Pages: 1... 678910... 21
  Archived months: [oct2010] [dec2010]

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