General C++ Programming - May 2009 (Page 5)

by g0dwyn
fstream binary mode
 
Hi everyone, So I've been setting an fstream class with openmode as binary and reading info to it, as in the following example: fstream file("foo.txt",io...
[2 replies] Last: Ah, great. Thank you! (by g0dwyn)
get formated input from a text file
 
Hi, (not using C++ ... just C) If i use ... fscanf(fp, "%d %s %d", &s.numero, s.nome, &s.idade) ...i will get strange results if i try to read a line li...
[2 replies] Last: fscanf(fp, "%d %[^0-9] %d", %s.numero, s.nome, $s.idade) Remember, ... (by Duthomhas)
Homework !!!
 
I am new at C++ and I am having a lot of trouble understanding it. The following is a homework assignment due this week and I have not idea how to even sta...
[3 replies] Last: #include<iostream> #include<string> using namespace std; class Em... (by alan6096)
my project
 
hey friends i have got my first project as follow: IT Enabled interaction system. A system through which user can post/receive a message to/from a user, group...
[4 replies] Last: The question about goto is very strange. Where have you heard that it'... (by Hammurabi)
Entered values arent being saved/updated
 
For one of my assignment questions, it states When Enter Mark is selected from the main menu, if the student ID supplied by the user already exists in the reco...
[1 reply] : Well nowhere in your code does it ever make an attempt to save the new... (by Tevsky)
Random Number
 
Dear sir i posted in the last three days a question and a get the reply for it, but i have another question, which is how can i get a random number betw...
[3 replies] Last: How about you generate an initial random number with only 2 possible n... (by Tevsky)
using mingw for cross compilation ( butild kernel.bin )
 
hi I just reading some tutorial to write my own kernel using C and Assembly. It just use a linker script and mearge the output object files into kernel.bin ...
[3 replies] Last: allright ! after a hard time with the google.com , acutually burte for... (by sanzilla)
StreamReader
 
Dear sir i have a problem with seek in StreamReader, my problem is i want to read the contain of a text file, but the reading is done like this ( read f...
[5 replies] Last: Dear PanGalactic thank you for your reply, i did what you suggest a... (by rasred2004)
Linear Search not working properly
 
I have programmed my linear search to find/display student records. However, I have noticed that there is an error in my program. The problem is that whatever v...
[3 replies] Last: That's what happens when you declare variables inside a switch case. W... (by helios)
Entering and storing records
 
I am writing a program that will allow the user to enter new student record(student ID and the corresponding mark). The program will then store this record and ...
[1 reply] : Store your student records in a std :: vector . Write a function to ... (by Duthomhas)
Organizing an Array
 
How would you go about *most efficiently* organizing an int array from smallest to largest number. Here's a quick example code, has no error checking and is ver...
[2 replies] Last: How would you go about *most efficiently* organizing an int array fro... (by Bazzy)
by Disch
.zip file read/write
 
I was looking for a lib from which I can read and modify .zip files. After doing a bit of research, libzip seemed like the frontrunner: http://nih.at/libzip...
[7 replies] Last: Sorry, this was a case of something I googled that seemed to meet your... (by Duthomhas)
by baross
User defined function
 
Having trouble getting a user defined function to work correctly. I only want it to check if the number are below 12 or above 18. Then i want it it cout a warni...
[1 reply] : http://www.cplusplus.com/doc/tutorial/functions/ (by firedraco)
Displaying Average Mark
 
I need help with my program for displaying the average mark of student records. My coding for average mark is on Case 1. The problem is that it does not displ...
[2 replies] Last: I have changed the value of totalStudents to 2 and removed the totalSt... (by lebronjames)
Repeating the output
 
Hey guys What is the function to keep repeating the output line after the user inputs the information Thanks
[no replies]
To calculate subset of a set of variables.
 
Bonjour Is there any method available in Boost graph liberary to calculate subsets of length N of a SET? if no please guide me how i can calculate it. e.g. ...
[no replies]
Outputting random lines from a .txt file
 
Hey How do you output 5 random lines of text from a .txt file on C++ ? Thanks
[1 reply] : Hmm, one "gimme" is enough. http://www.cplusplus.com/forum/general/112... (by Duthomhas)
Using struct and linear search to display student record
 
Okay, I've spent the last 4 hours trying to figure this out and all I get is constant error after error. I have gone through numerous forums, websites, textbook...
[3 replies] Last: Thank you very much guys for your help. I have adjusted the codes i... (by lebronjames)
adding numbers(integers) from a .txt file
 
Hey guys How do you add numbers(integers) from a .txt file and then output it on C++. Note: each number is on a separate line yet are under the same headi...
[1 reply] : 1. Set the sum to zero 2. Open the file 3. While you can read a numb... (by Duthomhas)
by davist
Anyone Who Can Write this program would be appreciate
 
Malom is one of the oldest board games. A board was found drawn in the ceiling of an Egyptian temple dating 1400 BC. The game is played on a board with 24 point...
[6 replies] Last: I agree with Zhuge and Duoas. He's just being lazy and can't be asked ... (by chrisname)
May 2009 Pages: 1... 34567... 17
  Archived months: [apr2009] [jun2009]

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