Beginners - May 2010 (Page 10)

quick question about fstream
 
I have open a file for reading and writing. fstream file; file.open ("file.dat", ios::in | ios::out); I need read and replace some information et the b...
[1 reply] : ios_base::end may help, as may seekg(). You may find out more about th... (by Albatross)
problem regarding the -dumping of stacktrace
 
Hi i am using eclipse as ide for c++ and have made a program to remove a particular character from a string . The problem is that when i try to run it ,it ask ...
[3 replies] Last: When I compiled this, I got a warning that your expression will always... (by Albatross)
Cant enter a right curly brace !
 
Hi I'm a beginner in c++ but i know the basics of C# and Java. I downloaded Visual C++ and tried to create a Hello World program. But I cant enter a closing br...
[10 replies] Last: I'd recommend that you do indeed use AltGr+7 instead of Ctrl+Alt+7... ... (by AngelHoof)
Newbie needing answers
 
Hi all. I'm a bit of a newbie at C++ and at present l'm studying for a c++ exam. Can someone please explain to me what this does -> ??? And how it's us...
[1 reply] : If you are using a pointer to access a member function of a class, you... (by AngelHoof)
guys take a look to this problem(c2664) about string
 
guys i wrote down program every thing is fine but that have 4 error , and errors is same with c2664 can u debug it for me !? thanks for your time :X ...
[2 replies] Last: @kooroshkdt Your code will not compile if you have void main(). ... (by Albatross)
imestamp from localtime mktime
 
Hi, i have to kind of strings (char*) 1) hh:mm:ss 2)YYYY-MM-TThh:mm:ss.000Z (eg.:"2008-09-26T01:51:42.000Z") long Timestamp(char* CurrentTime)...
[1 reply] : That's as good as it gets, it's a messy business. You can check the... (by kbw)
Coding Conventions (1,2)
 
Hi guys, I'm archmage84, and I love the tutorial on this page. It's really helped me learn how to do stuff well. I'm a little curious as to the convention...
[26 replies] Last: C and C++ programmers typically expect that ALL_CAPS identifiers repre... (by Duthomhas)
How do you stop a program skipping inputs?
 
In this program I want to be able to take user input to make a class. Unfortunately when I run the progrma the computer skips some input. This is the section o...
[5 replies] Last: All user input ends with ENTER http://www.cplusplus.com/forum/beginne... (by Duthomhas)
Whats Wrong again zzz!!URgent
 
Did i made a mistake again? Look bottom of my code for my specific question which is bolded in the comments Thanks... class Employee { protected: char E...
[8 replies] Last: Okay thanks people :) (by DoomCarnage)
C++ Set and Get problem
 
hi friends, I am new to c++, just learning. i want the program to access the private member of the class, and have used set and get, and validate when user inp...
[3 replies] Last: Thank you very much friend. (by mugilan)
Error: The name streambuf is ambiguous, streambuf and std::streambuf.
 
Hi i m trying to write huge code buts it getting error, "/opt/studio11/SUNWspro/prod/include/CCios/iostream.h", line 1387: Error: The name streambuf is ambigu...
[1 reply] : The compiler has come across the name streambuf and has found more t... (by closed account z05DSL3A)
by igee
* Least squares identification with Matrix manipulation
 
The problem: We want to write a program that, given in input a file with a list of current/tension measurements collected on a resistance of a circuit, will be...
[no replies]
Menu messing up, not working properly, functions work fine without menu.
 
Ok so I have 2 functions, one checks for a valid password, the other capitalizes some letters. When I call them without using the menu they work fine, but when ...
[5 replies] Last: SOLVED :) The answer lies in using "getline" and "stringstream" and... (by Sputnik)
static member array of class
 
when we write a program with class using a static member array, if we want to assign x to y. Don't we need to write an overloaded operator= like dynamic array o...
[1 reply] : when we write a program with class using a static member array You ... (by m4ster r0shi)
by john92
"Too Few Argument to Function"
 
I seem to have this error message "Too few arguments to function `void draw_a_card(int&, int&, int&)" but it seem there is enough. I called the function around ...
[5 replies] Last: You need to initialise your variables. int card, type, value; => ... (by closed account z05DSL3A)
by Deluge
How to Initialize an Array in the Constructor
 
I want to have an array as a class member, but the only way I know how to initialize the array in the constructor is by adding each element individually (array ...
[2 replies] Last: Why not use string? (by aidyszh)
simple c++ problem
 
1. Create a file called data.txt with the following data, which are the lengths of the sides of an irregular pentagon in order going clockwise (a, b, c, d, and...
[1 reply] : You should not put a semicolon after an if statement, because that rea... (by Athar)
why c++ given different answer
 
when is calculate manually using calculator 365.25 x 2009 = 733787.25 but when in c++ the answer is 12891. why it be like that and how i can get answer using c...
[3 replies] Last: thank you to all my friend...i success solve this problem......before ... (by sopian87)
by aachen
ios::binary
 
Hello people, I am trying to read a text file and put the content in an array. I opened the file using ifstream successfully on my computer and read the file...
[no replies]
by john92
Case Statement
 
I am writing a simple blackjack program and I am wondering can you use arrays in switch statement? (switch (ranks )) I am trying to assign each card a value so ...
[3 replies] Last: Use an if/else chain instead of a switch. (by firedraco)
May 2010 Pages: 1... 89101112... 33
  Archived months: [apr2010] [jun2010]

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