General C++ Programming - April 2012 (Page 24)

Repetition.
 
I am trying to create a program that will allow a user to input 5 letter grades and then it outputs the total grade points and the grade point average. I am hav...
[4 replies] Last: Use else-if rather than else statements with if statements inside them... (by MrHutch)
question about arrays
 
Hi! I've been dealing with this problem for a couple of hours, maybe you can hel p me: I have an array of "1" and "0" like this one: 01100111100 And I ...
[2 replies] Last: Thank you!! that worked perfectly!! (by malakian)
by Nawaf
Alphabetically sorting items problem
 
Hi everyone, I have this "Address Book" code. I am trying to get it to sort items alphabetically. I looked up how to do it but really did not find anything hel...
[no replies]
String to Array
 
I am reading a file which has values separated by commas. In my program the file starts out as a string but I need it to be an array. What is an efficient way t...
[1 reply] : While you can read from the file, use getline to get everything until ... (by LB)
Heapsort?
 
Can anyone briefly describe the heapsort algorithm to me? How is the algorithm able to work "in place", i.e., without making use of any additional storage spac...
[3 replies] Last: I believe, by additional storage space, he means additional "array spa... (by Kyon)
how to modify a particular content in a file
 
how to modify a particular field of a record in a file where records saved as line by line
[2 replies] Last: Thank you for this wonderful post on how we are to properly modify a c... (by LB)
by Malcom
Need help here
 
#include<iostream> // required for cin , cout #include<cmath> // required for sqrt() using namespace std; int main() { const int size=56; ...
[7 replies] Last: I am done with Range, Mean, Variance, Now I want to locate the median.... (by Malcom)
help writing an integral function!!
 
IF anybody can help i would be really very happy i have to implement a function called phi1 that is is this way ) q(z)=integral from z to infinity of q(x)dx (...
[2 replies] Last: how can i implement the summations z+ z^3/3 +z^5/3x5 + z^7/3x5x7 ... (by gethelpcpp123)
by user98
Please Help
 
i have to answer this: Write an algorithm (without modules) that asks the user to input the elapsed time for an event in seconds. The algorithm then outputs ...
[14 replies] Last: you have to try first .. (by bluecoder)
Target each character of a string
 
Im trying to change a hexadecimal number to a decimal number and the only problem i have is that i don't know how to compare one character in the string to anot...
[4 replies] Last: O thats right i forgot about that. I feel dumb now. thanks for remindi... (by Sspangler)
general text
 
i am trying to print text into a window that i made with sdl. i have the ttf library and fonts but it keeps saying TTF_Init(); i wrong. i guess i am asking how ...
[1 reply] : Did you remember to link the SDL_ttf library? I think the compiler fla... (by Peter87)
by minlow
2 contructors. Help
 
I had written the program for inheritance. However the programme cannot be run and reflected more than one instance of constructors from the derived class. Pls ...
[5 replies] Last: Hi Peter, thks for the prompt reply. After getting rid of the default ... (by minlow)
HELP NEEDED
 
am getting an error and this statement seems to be a problem am not seeing but i feel so void readfile()/*Function to read from roomdata_in.txt*/ { if(...
[1 reply] : What error are you getting? (by kooth)
Problem with converting ordinal date to mm dd yyyy date form
 
I am writing a program as a hw project and I am having problems with this last little bit of it. The idea of the program is to take a date in the form of mm d...
[1 reply] : Use the default class for time http://www.cplusplus.com/reference/cli... (by TheDestroyer)
input/output and arrays
 
I have an interface (.cpp),header(.h) and implementation(.cpp) The interface does the input/output. The header writes the class and it's member functions: Th...
[2 replies] Last: Please if anyone could help me. (by Stephanie)
by five1
unknown error. Please help
 
Following is the code. Error occurs in reading the file somewhere I guess but I am not sure Please help me out of this. #include<iostream> #include<fstr...
[no replies]
need someone to check my work
 
1. NIM is a game in which two players take turns removing objects from a collection of objects. A player can only take 1, 2, or 3 object(s) per turn.. The game ...
[5 replies] Last: The solution then: Can I have some music? Ta tata ta ta ta Taaaaa!!! r... (by Pravesh Koirala)
shared_ptr and nullptr
 
I have some function from third party library that i want to wrap, and sometimes i must pass nullptr. Is this safe? typedef std::shared_ptr<Bar> sp_Bar; ... ...
[2 replies] Last: Thanks. If setSomething can handle null pointers it's safe. Yes,... (by morando)
by Malcom
Need help
 
A computer program to determine the median. (a) Maximum (b) Minimum (c) Range (d) Mean (e ) Standard deviation (f) Variance Now I want to locate the medi...
[3 replies] Last: First things first, you need to sort the numbers. You can write your ... (by MrHutch)
Vector help!
 
To start off im new to this forum and im a noob in c++. im currently taking college courses. So to begin.. i have a homework assignment that i turned in last ni...
[no replies]
April 2012 Pages: 1... 2223242526... 49
  Archived months: [mar2012] [may2012]

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