Maritimo 15 Junior Poster in Training

I recomend you to use the function int toupper( int ch ) defined in header <cctype>

cambalinho commented: thanks +3
Maritimo 15 Junior Poster in Training

Replace strVec.push_back(getline(about)); with strVec.push_back(getline(infile));
Then show the vector strVec
Then sort the vector strVec
Finally show again the vector strVec

Maritimo 15 Junior Poster in Training

D is something like to try to create a car that can fly like an airplane and transport like a jumbo but with the facility to dive under the sea. And all of these applying restrictions to what C++ can do very well, just because something has decided that some features of C++ are "mistakes"!!

I have studied completely D and I am sure that this is another language that will make some little noise but will disappear very zoon. It do not have all the libraries tha has C++, D is not compatible with C (the most used language in the world), their compiler is totally new and it belong to a company so prepare to suffer from a lot of restrictions if you use it.

D is being conceived under the idea that C++ has some "mistakes" (who decide this?) and buala, Digital Mars will create a totally new language free of all these "mistakes".

Only one question: Are you sure that D don't have a lot of totally new mistakes?

For instance, Digital Mars has decided that multiple inheritance is a mistake so, they have removed it from D. Personally I think that this is a mistake in D.

Digital Mars has decided that new and delete are a "mistake" so they have created D without pointers and free memory management. They have included a garbage collector for the memory management. Digital Mars thinks that the memory management is so important that it must be assigned only …

Maritimo 15 Junior Poster in Training

If you want to count the total numbers of ; in your file, don't use an array int dotcoma[150], just use a simple variable int dotcoma and increment it when you find a ;.
On the contrary, if you want to count the number of ; on each line, do what you are doing but, at the end, print all the array.

Maritimo 15 Junior Poster in Training

Replace

#define TRUE = 1;
#define FALSE = 0;

with

#define TRUE 1;
#define FALSE 0;

I don't know what you program must do but with this replacements there should not be more compiler errors. Good luck.

Maritimo 15 Junior Poster in Training

Taking into account that:

If a number N ends in zero then the remainder of N integer divided by ten is zero

You could count the number of zeroes inside a number N with the following algorithm:

Initialize Counter to zero
While N is greather than zero
  IF N ends in zero then increment Counter
  Integer divide N by ten
End while
Print Counter.
Maritimo 15 Junior Poster in Training

Rubberman: I chanched the down-vote. Sorry. Please don´t go into a war.

rubberman commented: I think we understand each other better now. All down-votes are removed, and thanks for the comments. I'm still new with C++11. +12
Maritimo 15 Junior Poster in Training

In C/C++ you must define everything befor use it. For example, if you need a variable to store an integer --say a--, first you must define it like:
int a;
and later you can use it like
a=3;.

The same happens, for example, with functions.
Suppose that you have declared a function on one file, say:
int addOne(int a) {return a+1;}.

Later, if you want to use this function in some other file, first you must declare it:
int addOne(int a);.
Then you can use this function like:
b = addOne(b);

If you want to use this function in other file, you must do the same, declare and use:
int addOne(int a); c = addOne(a);

It is impossible to remember all the function's declarations so you can define them before use; also it is very tedious to write all the declarations. This is where the headers file help you.

For this function you can write a file (named addOne.h for example) in where you write the declaration of your function:
int addOne(int a);
When someone needs to use your function, he/she only needs to include this file into his/her file:
#include <addOne.h>
and use the function freely.

In conclusion, the purpose of the header files is to save the declarations of variables, functions, structures, macros, etc; so you can use them later into your program just including these heather files. This makes very easy to declare everything before using it in a systematic way.

The …