Search found 31 matches

by cplusplusnoob
Sat Apr 04, 2009 8:59 pm
Forum: Programming Discussion
Topic: push_back, square( )ect.ect.
Replies: 32
Views: 3535

Re: push_back, square( )ect.ect.

i didnt include the stuff before that generally so not to bore you but i will now make it clear. #include"stdafx.h" #include<iostream> #include<string> #include<vector> #include<algorithm> #include<cmath> using namespace std; int main() { vector<double>temps; double temp; while((cin>>temp)...
by cplusplusnoob
Fri Apr 03, 2009 4:30 pm
Forum: Programming Discussion
Topic: push_back, square( )ect.ect.
Replies: 32
Views: 3535

Re: push_back, square( )ect.ect.

I am not sure if this is what you meant but it could be between line 19 and line 24. ;) :lol:
by cplusplusnoob
Thu Apr 02, 2009 4:26 pm
Forum: Programming Discussion
Topic: push_back, square( )ect.ect.
Replies: 32
Views: 3535

Re: push_back, square( )ect.ect.

I think nothing but, then again their might be some spaces in there.Anyway pretty much nothing comes after the median tempurature line other than the warning that pops up.

and thank you :)
by cplusplusnoob
Wed Apr 01, 2009 7:47 pm
Forum: Programming Discussion
Topic: push_back, square( )ect.ect.
Replies: 32
Views: 3535

Re: push_back, square( )ect.ect.

first off i will enter the data and it will say the average and median tempurature and then the debug asertion warning thing.
second thank you for cerrecting me im all for that. :)
by cplusplusnoob
Fri Mar 27, 2009 8:57 pm
Forum: Programming Discussion
Topic: push_back, square( )ect.ect.
Replies: 32
Views: 3535

Re: push_back, square( )ect.ect.

ok this does work and sorry again schools been loading on the homework and I have to make money now and then too so for the lateness my appologies. Like I said earliar this does work but when all nubers are written in a box pops up with a big explination point and says debug assertion failed. why? p...
by cplusplusnoob
Tue Mar 24, 2009 10:13 pm
Forum: Programming Discussion
Topic: push_back, square( )ect.ect.
Replies: 32
Views: 3535

Re: push_back, square( )ect.ect.

I am now trying, as per the instructions of my book, to add some doubles int a vector and make it output witch is the smallert largest and all of the numbers put together. I started with just the smallest part to keep it simple.Your program had a warning but the program seemed to work fine so I didn...
by cplusplusnoob
Sat Mar 21, 2009 12:08 pm
Forum: Programming Discussion
Topic: Terminate input on '|'
Replies: 18
Views: 1807

Re: Terminate input on '|'

thank you it works you are the man. ;)
by cplusplusnoob
Sat Mar 21, 2009 6:20 am
Forum: Programming Discussion
Topic: Terminate input on '|'
Replies: 18
Views: 1807

Re: Terminate input on '|'

that worked very nicely ;) a simple solution to a simple problem, funnily enough, i've never been able to get cin.clear() to work in the past, it's always just ignored my command to stop, therefore i've been trying to find a solution that worked around that. But yours worked perfectly fine, so now ...
by cplusplusnoob
Fri Mar 20, 2009 7:31 pm
Forum: Programming Discussion
Topic: push_back, square( )ect.ect.
Replies: 32
Views: 3535

Re: push_back, square( )ect.ect.

Thanks man and nice music. ;)
by cplusplusnoob
Fri Mar 20, 2009 5:34 pm
Forum: Programming Discussion
Topic: push_back, square( )ect.ect.
Replies: 32
Views: 3535

Re: push_back, square( )ect.ect.

You should write temps instead of temp in line 7 and try to clean up your code a bit ;) witch one? 20 seconds of try and error ;) You are right.That was just plain laze and it shant happen again, however, this program does work but I don't know how to make it understand I want the medean and not to...
by cplusplusnoob
Fri Mar 20, 2009 12:11 pm
Forum: Programming Discussion
Topic: push_back, square( )ect.ect.
Replies: 32
Views: 3535

Re: push_back, square( )ect.ect.

K-Bal wrote:You should write temps instead of temp in line 7 and try to clean up your code a bit ;)
witch one?
by cplusplusnoob
Fri Mar 20, 2009 9:38 am
Forum: Programming Discussion
Topic: push_back, square( )ect.ect.
Replies: 32
Views: 3535

Re: push_back, square( )ect.ect.

using namespace std; int main() { vector<double>temps; double temp; while(cin>>temp) temp.push_back(temp); double sum=0; for (int i=0; i<temps.size();++i)sum+= temps[i]; cout<<"average temurature: "<<sum/temps.size()<<endl; sort(temps.begin(),temps.end()); cout<<"medean temurature: &...
by cplusplusnoob
Thu Mar 19, 2009 10:30 pm
Forum: Programming Discussion
Topic: push_back, square( )ect.ect.
Replies: 32
Views: 3535

push_back, square( )ect.ect.

I have been doing the programs as best I can as my book tells me to and some things just did'nt work.It started with square witch would square a number but i can do that manually without too much trouble so I did.Now it's to the point where i can't do anything else.Currently learning about vectors I...
by cplusplusnoob
Thu Mar 19, 2009 2:53 am
Forum: General/Off-Topic
Topic: amazing facts
Replies: 4
Views: 620

Re: amazing facts

Yeah i saw it. It was the one about the dogs.
by cplusplusnoob
Wed Mar 18, 2009 8:34 pm
Forum: General/Off-Topic
Topic: amazing facts
Replies: 4
Views: 620

Re: amazing facts

That was interesting, mabye make a good conversation someday. :)