Beginners - April 2008

why can't this array get past 3 without crashing?
 
// 04/05/08 // #include <iostream> using namespace std; #include <stdio.h> #include <cstdlib> #include <fstream> class ArrayClass1 { privat...
[4 replies] Last: Thanks goti I'll try it. (by waterfreak79)
by trufl
simple fstream problem
 
#include <fstream> using namespace std; int main() { fstream ioFile; ioFile.open("ioFile.txt", ios::in|ios::out); ioFile << "blah blah"; ioFile....
[1 reply] : // writing on a text file #include <iostream> #include <fstream> u... (by closed account z05DSL3A)
C++ help please
 
how do i write a function that returns a function that accepts one argument as the change. The function should convert the change in numbers of dollar, quarter,...
[1 reply] : If I understand your question correctly, you could possibly make a cla... (by Zhuge)
Code causes errors within include files???
 
following code for some reason, causes following errors withing its include files, when compiled with microsoft visual c++: 1>c:\program files\microsoft visua...
[11 replies] Last: ty that sorted errors with .obj files but now my functions don't actua... (by Bubba Ex)
stdin
 
Why library functions behave diffrently when taking input from stdin. For example, if i use getchar() then it keeps taking input till i press enter!! Why is th...
[1 reply] : stdin by default is line-oriented, which means the data does not becom... (by jsmith)
file truncation .... ?
 
iam using the fstream class and need to truncate a file at some point "not from the start" is it possible under windows ?
[no replies]
issue with arrays
 
not sure if I did this right or not but returning alot of errors: #include <iostream> #include <fstream> #include <iomanip> #include <string> using ...
[1 reply] : Hi..., May be due to the cout << "The numbers in the array are: "... (by DiptenduDas)
Help to understand Threads
 
Just looking for clarification on what a thread is. My understanding is that it involves more than one function (if that is a correct word to use) For ins...
[2 replies] Last: If you want to know more about threads, try: http://en.wikipedia.org/... (by closed account z05DSL3A)
Help me please
 
This is a program to determine the fewest of each money denomination required to make change. I'm stuck in the last part, I can't display correctly, the amount...
[2 replies] Last: Hi..., As your code states the Remainder value is always "0". D... (by DiptenduDas)
Logical error
 
pliz help,I want this program to show a message indicating whether a specific price is equal to 111 or not. This program compiles correctly but gives wrong resu...
[4 replies] Last: or you could obviously say \ if (price != 111) cout << "Price is not... (by bdeklerk)
dont quiet get c++...can someone help?
 
Heres the deal i have done 3 differant c++ tutorials and i am still lost. i know alittle about it but i guess its just not getting into my thick skull. if someo...
[2 replies] Last: Hi, mjackson13, I'm also learning C++ now and if you have problem, I ... (by tsubusa)
output to the screen
 
I need to retun the highest value of an array out to the screen, this is my code. #include <iostream> //#include <ctime> using namespace std; const ...
[1 reply] : Do U need the logic and code for the fmax() function ??? Or something... (by DiptenduDas)
program to check for duplicates in a string
 
Hello again, posting once again for help...Here is my code. It is supposto recieve 10 numbers and outpu the duplicates. //inputs, searches for d...
[5 replies] Last: const int InArSize = 10; const int DupeArSize = 5; int InputArr... (by InLight)
by iFox
Cant run my stuff on other's people pc's.
 
When I compile anything with Visual C++ 2008 (9.0) express and run it everything is fine, but when i try to send the .EXE file to someone they cant run it on...
[5 replies] Last: You could do a search using VS's internal help files or maybe just Goo... (by firedraco)
by fonzie
file I/O troubles
 
This code should prompt input for 5 fields and then write them put them into an array and write to a file. I get an error message when I close the file, anyone ...
[1 reply] : Close is function, so it should be CustomerFile.close(); (by firedraco)
why cant I acces private/protected members
 
I created a simple timer program but my method cant access the private members, anyone has any idea why. and the answer is like 3 billion. did i do anythin wro...
[8 replies] Last: jsmith wrote: > Also, clock_gettime() is a POSIX function that will (... (by rpgfan3233)
Trying to output data into a text file.. please help me?
 
I'm supposed to write a function that will allow the user to save information into a text file (.dat i believe), however i'm having some dificulties. I have the...
[2 replies] Last: thanks, that took care of it. appreciated. (by Rynomite04)
by st33d
Member functions file scope error
 
I'm new to C++ from Java and I'm trying to port a program from Java into C++. I have a class called Rect (a rectangle of course) and I have a static function...
[4 replies] Last: Thanks, that clears things up brilliantly. (by st33d)
Expected Primary-expression
 
I've been looking through this code for 2 hours, been on google. But i still can't fing the answer to this: expected primary-expression before "else" ...
[3 replies] Last: Note that you can 'chain' desired output using cout and multiple << s... (by Faldrax)
String with changing number?
 
Hi, I'm having trouble writing a code that will make a list of strings that have an increasing number at the end of it (ex.The output would be example_1, exampl...
[5 replies] Last: itoa i = int to = to a = alphabet Takes an int and changes it ... (by InLight)
April 2008 Pages: 123... 18
  Archived months: [mar2008] [may2008]

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