Beginners - January 2010 (Page 5)

Write an array to binary file and read it back in
 
I have a class called Person Then I have an array of Person's called db . How do I write the entire array to a binary file, and then read it back in? I'm cu...
[5 replies] Last: @Duoas i see.. thanks, i'll read about vectors tomorrow. it's already... (by blackcoder41)
dos games
 
didnt the games that where made in the 90's made from dos? is it anything like how i program in the dos window except they put graphics in it?
[5 replies] Last: I found DOS programming enjoyable, particularly because you could acce... (by moorecm)
How to make lines for a tic tac toe board?
 
I know this is just insanely amateur, but my computer programming class wrote an unbeatable tic tac toe program for its final project, and it works fine. My...
[4 replies] Last: whatever.. it's just a design.. (by blackcoder41)
Extrating specific thread information
 
Hey guys, im quite new to c++. i am doing a project in which i would have to extract certain information of a database which i have saved in a text file. the da...
[4 replies] Last: Just to check. are we able to set delimeters in the substring? for exa... (by gregarion)
remove last character in char
 
hey alll this my code : ... char tmp ; int id; cout << "enter an id " << endl; cin >> id ; ( for exemple 1234 ) .... itoa(id,tmp, 10); <----...
[8 replies] Last: Sure, but why bother when in the OPs example the char array is just be... (by Zhuge)
by H P
expected unqualified-id
 
Hello, I am getting the following error in my .h file due to which the compiler doesnt recognize the function in the .cpp file: In file included from Plc....
[1 reply] : C doesn't support classes, so there are no situations where extern "C"... (by helios)
Visual C++, not this C++?
 
I am 13. Trying to get stated learning C++. But am having trouble getting the "Hello World" program to work properly. The C++ syntax taught on this sight is com...
[4 replies] Last: (2) What system("pause"); type thing should I use so it doesn't close... (by Bazzy)
C++ or Java
 
I haven't programmed for 15 years and want to do it for recreation with perhaps developing something for the amateur radio community. I previously programmed i...
[5 replies] Last: Also, VC++ Express does not include MFCs. It's probably not a problem ... (by lloydchristmas759)
Calling source files
 
I'm wondering how to call a source file (or resource or header)... In case I have "main.cpp" and "minor.cpp", how should I call "minor.cpp" when I'm in "main.c...
[5 replies] Last: So I only have to say there is a function in the header, and define it... (by Zeldami)
difftime() returning incorrect values
 
I am using difftime() to compare two time_t values.If the diffrence between the two is 6 secs, difftime returns as 3606 Please give me ideas on where I am do...
[1 reply] : How could we help you if you don't post your code ? I tried this co... (by lloydchristmas759)
Implementing an operator in a child class
 
Hi all, First of all: I hope this is the right forum for this sort of question. If not, feel free to move it. i'm having to classes (say: CFoo and CBar), ...
[7 replies] Last: Hi jsmith, what do you mean? Comparison of 2 Bs works very well, an... (by TheBear)
C++ string write to file problem.
 
hi guys, i am an extreme extreme extreme beginner to c++. im trying to get my program to create a file with my own extension and write data to it, but i keep ge...
[7 replies] Last: You can't overload operators for non user-defined types ( eg classes )... (by Bazzy)
by rey
Source code advice
 
Hi Guys, Need help on how to come out a program with the below display. Appreciate for your advice. Thanks in advance. Cheers! Enter hrs, mins and am/pm ...
[9 replies] Last: thanks bro well the o/p of "The arrival local time in city B is 3:5... (by rey)
by vlad61
confused
 
im a little confused as to why rewriting the following code instead of the double cout i have why it will not let me just add a "cout <<"blahblah" result;" im ...
[2 replies] Last: O.o...thank you so much! (by vlad61)
copying part of a string?
 
Okay say I have a string with 6 characters in it. What can I do to copy the first 2 characters into one string the next 2 into another and the last 2 into a thi...
[2 replies] Last: Oh ok I see it now. I was looking at it as starting character and end ... (by cbouwkamp)
by copper
#include -ing a *.cpp file
 
Hello there, This is my first post here. Hope it is not a very dumb question. Just wanted to understand does anything different happen and CAN WE actually d...
[3 replies] Last: Hey Bazzy and Helios, Thanks both. I hope I get really smart in C++... (by copper)
I think I'm ready for the GUI but need to know how
 
I think I'm ready for the GUI but need to know how to use it. I know about all the basic stuff that you can do in a terminal on linux boxes. Now I need some re...
[13 replies] Last: ... malloc is c, right? (by syneris)
destuctor of function?
 
do functions have destructors? like for example: int Rectangle::compArea() { x = 1 + 2; } int Rectangle::~compArea() { x = 0; } or des...
[5 replies] Last: I see. Thanks a lot jsmith. (by olredixsis)
Problem with Game Class Project
 
The final project in my computer programming class is to create a simple game using C++. Unfortunately most of the semester was spent on a program called Alice...
[7 replies] Last: for ( ctr1=0; ctr1 <=5 ; ctr1++ ) { diceRoll1 = (rand... (by syneris)
Trying to make a program that can find exponents...
 
Ok, I am trying to compile a program that can find the exponent of a number. However, I get a few errors when I try to compile. Here is the code: #include <...
[5 replies] Last: I call it schizophrenic. (by helios)
January 2010 Pages: 1... 34567... 24
  Archived months: [dec2009] [feb2010]

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