Beginners - February 2012 (Page 38)

cin being annoying
 
int choice = 3; Search search; string line; string temp; ifstream fyle ("actress.txt"); while(choice != 1 && choice != 2) { cout << "Press 1 to ...
[7 replies] Last: Wow there's so much i DON'T know. Thanks so much, it worked! (by beschwa)
Greatest to Smallest Numbers
 
I need to write a program that asks the user to enter 10 numbers. It should then print out the biggest number and the smallest number.The program can use if sta...
[5 replies] Last: Thanks for the help! (by mercifulwrath)
is there a short way of doing this function
 
the program below is sorting out array element and place them in ascending order # include <iostream> #include <string> using namespace std; //functio ...
[9 replies] Last: Sorry your teacher is being weird... and for the grief. Draw yourse... (by Duthomhas)
by kay4
Help with my Class work
 
thanks i solved it
[2 replies] Last: You really aren't meant to ask homework questions, but I guess most pe... (by mofosho)
How to display vectors without a definite number
 
I apologize if the title is too vague, but here is my issue. I've written a program that inputs numbers into a vector and will display it's average and if the s...
[2 replies] Last: That...was awesome, thank you. Works perfectly! ^.^ (by Trashcan42)
I've been getting this error message: "type 'char' unexpected"
 
I'm trying to write a program that inputs a char value and depending on what that value is, does a specific calculation with another value. When i try to declar...
[1 reply] : char A, char C, char D shouldn't all be on the same line in that forma... (by mofosho)
basic file writing and reading help needed
 
So i have an assignment in which i need to write a program that takes 5 float numbers and creates a file / saves the numbers to the file and then have this file...
[2 replies] Last: ah that makes sense, thanks a bunch! (by Goochasauras)
Inputting data into vectors assistance
 
If I wanted to put each of the products I have in the below code into a .txt file how would I input that into the vectors? Pretty lost and confusing actually. ...
[1 reply] : #include <fstream> #include <iostream> #include <vector> #include <st... (by wolfgang)
help with a class error
 
i am writing a program to reorder events in the correct based on a date that the user provides, i am getting an error in buildtime. Main.cpp||In function '...
[5 replies] Last: All the compiler can leave until later is function calls, which get fi... (by Moschops)
How are vectors really made?
 
Ok so how I understand it, C++ does not allow for dynamic arrays. Yet a vector is exactly that. But, aren't vectors just some class that some individuals wrote,...
[2 replies] Last: Here's a very simple dynamicArray that takes care of its own size. ... (by Moschops)
by manp
printing multiple of a character just by defining it once
 
Hello, I am learning C++ and I have a question which if I want to search it by my own it will last more time than I have. first: I want to define a character ...
[2 replies] Last: Well for your first question, in order to do the first operation where... (by wolfgang)
was not declared in this scope
 
// Please help #include <iostream> #include <cmath> using namespace std; int main() { int answer; int answer2; int answer3; if (a...
[2 replies] Last: You're right, this was a while ago, juist some coding from when I was ... (by Max Richman)
by Suber
Need Help with If Statement
 
Okay I'm writing this simple program that asks for the names of three runners, then it asks for the time they finished the race. Based on the time they finished...
[1 reply] : Every if looks for an else. If an if doesn't have an else, weird thing... (by Apoapsis)
Structs and Vectors quick question
 
How do I obtain get the below vectors to form in one column under each heading? I want them to be all aligned under each of the headings I created. #i...
[4 replies] Last: I have this working now. How does one input data into the vectors from... (by xkaijinx)
Character Arrays
 
Hello cplusplus forums. Newb here. I'm having problems with character arrays. #include <iostream> #include <conio.h> using namespace std; int main() { cha...
[2 replies] Last: I think I understand. Thanks for the quick reply. (by Marshall Banana)
Classes Problem
 
I am doing a classes assignment and have managed to get most information down but im struggling with reading and writing from a .txt file, could someone please ...
[3 replies] Last: See this? ifstream myfile ("BankAccount.txt"); You're trying to cre... (by Moschops)
trying If Statements but got 8 errors dont understand some of em
 
I was trying if statements and else and I had a few errors. I was doing the example because I feel like that best way to learn for me. I going to show you my e...
[3 replies] Last: u were right that solved the problem thanks! (by abrofunky)
Write hello world but having problem seeing output
 
I know this post was already been done. I am still confused about it. #include <iostream> using namespace std; int main () { cout << "Hello World!"; ...
[3 replies] Last: thanks! (by abrofunky)
Journal
 
#include <iostream> #include <fstream> #include <ctime> using namespace std; int main () {time_t t = time(0); struct tm * now = localtime( & t ...
[no replies]
by jhorie
resetiosflags( ios::fixed | ios::scientific )
 
Can someone explain that? I really don't understand. I know what resetiosflags, fixed and scientific means. resetiosflags( ios::fixed | ios::scientific ) ...
[no replies]
February 2012 Pages: 1... 3637383940... 64
  Archived months: [jan2012] [mar2012]

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