Search:
Type: Posts; User: AKGROWN
Search:
Search took 0.02 seconds.
-
ok so where I messed up was declaring
numeric_limits
that fixed the problem thanx for the help gents.
-
Thanks for the input Lindley however that did not fix anything. I will post the full code again
#include <iostream>
#include <string>
#include <fstream>
#include <limits>
using namespace...
-
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main()
{
ofstream outFile;
string firstName, lastName;
string newFact;
-
I tried using
string newFact;
and am still getting the same problem where I input the new fact and it only outputs the first character.
-
While reading my text book I read that "The length of the input C-string must be less than or equal to 30 characters" and if I input a fact that is 75 characters it wont work? right?
-
So i just figured out that it supposed to go here
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main()
{
-
OK so I went a different direction a little bit. The last part of my program takes the name of the user and a fact he/she would like to see added to the program. The program itself copiles fine but...
-
offended no, but remember you wernt always a programming genuis either. All I asked was for help not a read the f$$$$$$ manual post. I have been trying to figure this out for 4 days before I even...
-
Do I need to declare a variable for every fact that will be read from the file
like
string fact1, fact2.......fact10?
-
This is what I am asking about because I do not understand what it is I need to do here. If i understood and knew how to do it correctly i wouldnt be asking for help. Im not asking you to wirte my...
-
Could someone help me out please!
-
I can post what I have but it wouldnt really make any sense as of yet. There is there are 5 text files
theUniverse.txt
facts 1-10
Sports.txt
facts 1-10
usHistory.txt
facts 1-10
Movies.txt...
-
no i havn't only because we have not learned anything about xml files in school. I am not even sure what they are or what they do, but I think I came up with a better idea. It may involve more typing...
-
This is an add on of my post earlier. My game has 5.txt files. Each one has 10 different facts about that specific category. When the user selects a category it goes into a switch and I want to...
-
-
this is what my menu looks like
cout <<"Please choose a Trivia Trainer category." << endl;
cout <<"A: The Universe" << endl;
cout <<"B: U.S. History" << endl;
cout <<"C: Video Games" <<...
-
I am writing my first "game" in visual c++. Im not working with graphics or anything so im not worried its just a simple text based game. Essentially I have 5 .txt files one for every category of...
-
Thanks again to the gurus here, couldnt have done it with out you.
-
Paul could you elaborate more on your comment about how I called the function improperly. And thanks for helping me with the .h file, that got rid of two errors. I am all but completly lost with...
-
Hi guys so I went ahead and did the best I could with the program on my own and now have some source code for you all to review. I had to zip it because it there are multiple source files but, the...
-
Now that I am thinking about it I am pretty sure I dont need to because the header file does not need to accept standerd I/O or anything other than contain the parameters for the function. Am I...
-
Since the program only requires 5 numbers should I harcode that into the function
ie.
int funcAverage(int num1, int num2, int num3, int num4, int num5, int sum)
-
I am having problems writing a function that calculates the average of 5 numbers inputted by user. This is all very confusing to me and has been eversince they were introduced. I am not sure which...
-
My assignment this week introduces multiple source files using a header file. The object is to write a simple program that uses a function to calculate average from 5 user inputted numbers.
My...
-
Thanks for the link but, the second part of my question is do I just cut and paste this in my source at the begining
|
Click Here to Expand Forum to Full Width
|