Few typos in code

Few typos in code


while rearranging the given code, I detected (rather g++ did) a few typos in it: the last argument "ofstream& output" is missing in the signature of print_flight, print_flights and print_travel.

So, to match the declarations of the functions, the signatures should be:

void print_flight  (Flight& flight, ofstream& output);
void print_flights (vector<Flight>& flights, ofstream& output);
void print_travel (Travel& travel, vector<vector<string>>& alliances, ofstream& output);

instead of:

void print_flight  (Flight& flight);
void print_flights (vector<Flight>& flights);
void print_travel (Travel& travel, vector<vector<string>>& alliances);

Or simply ostream and not ofstream if you want to have the possibility to print in cout as well.

In the hope that it will help someone :)

4 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

And some typos that don't affect compiler, but look rather funny:
- in Flight structure: discout instead of discount
- function nerver_traveled_to() instead of never_traveled_to()
- in time functions: seconde instead of second

Yeah, at first I didn't notice the "discout" because of the auto completion of my IDE. But at some point I was going nuts asking myself why the compiler said that "discount" is not a member of Flight... One of the bad things about IDEs ^^

Rock the bits!

Also, in newinput3 script shuld be:
time ./run -nb_threads 6 -from LONDON\ HEATHROW -to NEW\ YORK\ JOHN\ F.\ KENNEDY -depart...
instead of
time ./run -nb_threads 6 -from LONDON\ HEATHROW -to NEW\ YORK\ JOHN\ F\.\ KENNEDY -depart...

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui