Have you looked into the Boost Graph Library ? There is even a book written on it.I belive it is part of the Bjarne Stroustrup in depth series.
Type: Posts; User: big146
Have you looked into the Boost Graph Library ? There is even a book written on it.I belive it is part of the Bjarne Stroustrup in depth series.
#include <iostream>
#include <vector>
using namespace std;
void OddMagicSquare(vector<vector<int> > &matrix, int n);
void DoublyEvenMagicSquare(vector<vector<int> > &matrix, int n);
void...
Vectors provide no operation to remove elements directly that have a certain value.You must use an algorithm to do this.
Take a look at this and it might clear things up a little for ya.
...
If you want to create a console app without the wizzard.just select win32 console app and then select empty project under application settings.. this way you only have to add a cpp file.
Take a look at this....hope it helps
//The code below calculates the cosine of 50000000 random values
//using both a look up table, which is calculated at the beginning
//of the program, and...
Take A look at this....hope it helps
// Tic-Tac-Toe
// Plays the game of tic-tac-toe against a human opponent
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
Ya i seen that too.
for_each( v.begin(), v.end(), show )
That is next
So synaticly both versions do the same thing on the container vector? I was'nt sure if the for loop had some upredictable side effect. The book Im going through right now( STL programing from the...
My question is this, why would I prefer one over the other ?
vector<int> v(10);
vector<int>::iterator p;
int i = 0;
p = v.begin();
I installed 2005 beta and have had no problem. just make sure you specify the correct path and your off and running.From what I can tell the compiler is the real deal with full optimazation. I have...
>>Couldn't you fake the data, if this isn't for real use?
I gues i could,but i was trying to get the real deal going. I would use the program, but I would be the only one using it.
But I guess I ...
I think that all the info I need is on the cd-rom...But that would probably mean that I would have to reverse engineer it to figure out what functions to hook...So that I could use the data already...
Thanks for the reply's, I think that the TSP theory is a little out of my realm codeplug....:) but thank for the info... Im thinking that also maybe I could just load a database of things we aready...
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...
If you want to run just a simple console app, select win32 >> then console project, when the application wizzard dialog pops up select application settings and then select Empty project. After the...
Worked for me too...sorry...wish i could tell ya.
Thanks for the reply's folks!That shed's some lite on it for me.So it basicly boils down to preference ? by using &var intstead of *var(which both basicly do the same thing) I am tying &var to an...
Im not sure I follow you....They both change the value of the caller in main right ?
have a queston that is confusing me....ok say we want to pass a call to a function by refence or a pointer....like this
void squarebyRefernce( int &numberRef )
{
nuberRef *= numberRef;
}
Declaring a member function virtual enables the program to determine which function to invoke based on the type of object to which the handle points, rather than on the type of the handle.
...
The -> is also used in polymorphism.
say you have base class Point and derived class Circle, and they both have their own print functions as virtual void print();
Point point();
Point...
I think what your asking about is inheritance. You need to determine what type of relationship it has to the base class. i.e. "is a" or "has a"
for example: mechanic is a employee. And would...
You can still write standard C++ using visual studio.Net.Just use the standard syntax and #inlcude<files>. You cannot use the Net. namespaces for use in a standard C++ program.
instead of #using...
Im not familair with VI. But thank for the reply's.I downloaded borlands C++BuilderX to give it a try.I dont know though,I'm kind of partial to visual studion.Net.
So how many of you actualy...
Is there no IDE in Linux like the one in visual studio? Or is it all command prompt?