A
arnuld
Hi all,
I have come to a point where I can comprehend C++ code much better.
I will finish C++ Primer 4/e within next few days. Right now I am
feeling the need to have have coding standards when I write programs and
I feel I must apply some better ways to design my code e.g. all of my
the programmers at my college use to write this code:
for( int i=0; i <= 10; ++i )
{
add elements to array;
}
while I used this code from C++ Primer (the book recommended by you
people)
for( std::vector<int>::const_iterator iter = ivec.begin();
iter != ivec.end(); ++iter )
{
ivec.push_back;
}
and comp.lang.c++ totally pushed the things to the practical-level. One
of the best examples I have is this:
std::copy( std::istream_iterator<int>( std::cin ),
std::istream_iterator<int>(),
back_inserter( ivec ) );
no use of while-loop here while all of Post-Graduates of my college use
while, arrays an pointers and have no idea about map & istream
iterators.
what I am trying to say that std::copy is a good coding-standard. Now as
I will start writing code for real-life projects I want have a larger
look at coding standards so except hanging around comp.lang.c++ I want to
have an offline source. I have 2 choices:
1.) Effective C++ 3/e
2.) Effective C++ 2/e , Coding Standards (Herb Sutter et al.)
Effective C++ 3/e is twice as much expansive as 2/e. With limited
bud what you people advise ?
or you think I need something else to do and you have some other plans
for me , after all you are my teachers. I will be writing real-life
code within next week.
I have come to a point where I can comprehend C++ code much better.
I will finish C++ Primer 4/e within next few days. Right now I am
feeling the need to have have coding standards when I write programs and
I feel I must apply some better ways to design my code e.g. all of my
the programmers at my college use to write this code:
for( int i=0; i <= 10; ++i )
{
add elements to array;
}
while I used this code from C++ Primer (the book recommended by you
people)
for( std::vector<int>::const_iterator iter = ivec.begin();
iter != ivec.end(); ++iter )
{
ivec.push_back;
}
and comp.lang.c++ totally pushed the things to the practical-level. One
of the best examples I have is this:
std::copy( std::istream_iterator<int>( std::cin ),
std::istream_iterator<int>(),
back_inserter( ivec ) );
no use of while-loop here while all of Post-Graduates of my college use
while, arrays an pointers and have no idea about map & istream
iterators.
what I am trying to say that std::copy is a good coding-standard. Now as
I will start writing code for real-life projects I want have a larger
look at coding standards so except hanging around comp.lang.c++ I want to
have an offline source. I have 2 choices:
1.) Effective C++ 3/e
2.) Effective C++ 2/e , Coding Standards (Herb Sutter et al.)
Effective C++ 3/e is twice as much expansive as 2/e. With limited
bud what you people advise ?
or you think I need something else to do and you have some other plans
for me , after all you are my teachers. I will be writing real-life
code within next week.