- Upvotes Received
- 4
- Posts with Upvotes
- 3
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
15 Posted Topics
Re: Hello peeps, Im ben.Thought I would drop a line to say howdy! Im pretty new to C++ and teaching myself.This forum looks like it could be a big help in my learning adventure.So get prepared for some nooby questions. thks in advace for your help. | |
Re: I remeber my first skateboard was the black Knight(the one with the clay wheels).That was the greatest. Even though you could hit one little pebble while riding it and go end over end.Just to get back up and start all over. I dont think I ever spent more than 1 … | |
Re: Try removing optimazation options 0g/ 0i/ 0a. Remove one at a time to see wich one might be the culprit. | |
Re: [code] #include <iostream> #include <vector> #include <algorithm> #include <functional> using namespace std; int main() { vector<double> v; vector<double>::iterator p; for( int i = 0; i <= 10; ++i ) { cout << "Enter a number: "; double num; cin >> num; v.push_back(num); } cout << "Enter 1 for ascending or … | |
Re: This is just an example, but demonstrates reading in and outputing to( could be file or whatever) the screen. Enter the numbers you want seperated by a space. when you are finished hit enter then crtl + z and enter key again to output to the screen. [code] #include <iostream> … | |
Re: [QUOTE=walljoshua]i dont totally understand your code. [/QUOTE] That might be because your learning in C++ and dave is responding in C. | |
Re: Focus on learning the syntax and what you can and cant do. Then study the STL. Spend more time coding and less time writing algorithms. [code] #include <iostream> #include <list> #include <string> using namespace std; int main() { list<string> names; list<string>::iterator p; string a; for( int i = 0; i … | |
Re: Take a look at this.Maybe It can give you some ideas. [code] #include <vector> #include <iostream> #include <algorithm> #include <boost/shared_ptr.hpp> struct Foo { Foo( int _x ) : x(_x) {} ~Foo() { std::cout << "Destructing a Foo with x=" << x << "\n"; } int x; /* ... */ }; … | |
Re: You need to loop through...hope this helps. [code] for ( int side1 = 1; side1 < 500; side1++ ) { for ( int side2 = 1; side2 < 500; side2++ ) { for ( int hypt = 1; hypt < 500; hypt++ ) [/code] Post your code so we can … | |
Re: Hey there! Funny, I wrote the same thing awhile back when i first started :) I'll post the code so you can take a look at it. Just change the for loop to the desired number of itterations that you want or just use it as a template.This also was … | |
Re: Works for me..you just might want to put [code] cout << name[i]; cout << endl; [/code] so that the name appears on its own line..makes it easier to read. | |
Im thinking of writing( or attempting to write ) a routing program for delivery trucks. I was wondering what the best way to go about this would be? I would like to use zipcodes, but I would also need that lattitude and longitude to be able route them in some … | |
Re: I think what you want is somethng like this...(by the way I looked at your profile so i know you are not a kid working on homework). [code] #include <iostream> using std::cout; using std::endl; using std::cin; using std::fixed; #include <iomanip> using std::setw; using std::setprecision; #include <cmath> double calculateCharges( double ); … |
The End.