User profile: coder777

User info
User name:coder777
History
Joined:
Number of posts:4003
Latest posts:

Enforcing that a function does not modify dynamic array pointed to by pointer
If your compiler allows [code] int * bart = x;[/code] it's way too old. Get a more recent one

Initializing variable
It makes no sense to initialize [code]sum[/code] within the loop. Each time it will be set to 0 and ...

getline skipping first line
Read this: http://www.cplusplus.com/reference/istream/istream/getline/ The delimiter is the third ...

Non existing output
This is the problem:[code] cout << "even digits only \n"[u] + [/u](a*b); // Use << instead else...

Am I handling bad allocations well?
[quote=Disch]Generally there are 2 times you'd want to do this:[/quote]Actually there are at least 3...