c++

hey can any one help me in programming....
what kind of help you need?
programming is quite tough subject .i am in 2nd semester of BSCS.what would be solution to do best programming.
1. http://www.cplusplus.com/doc/
2. Always use proper indentation
3. Have fun programming :)
i am in 2nd semester of BSCS.what would be solution to do best programming.

I suggest six more semesters of BSCS. Study hard and write lots of code.
closed account (zb0S216C)
hira aftab wrote:
what would be solution to do best programming.

I don't understand. Correct me if I'm wrong, but, are you asking how you can become a better programmer?
If so, here's a couple of tips:

1) Indentation helps with the readability of the code.
2) Make sure the identifier of a variable, function, or class describes what the variable, function, or class does. For example:
1
2
3
4
class _3DARRAY
{
    // ...
};

In this example, it clearly tells the programmer that the class contains an array which represents the 3D co-ordinates.
3) Comment areas of code that may become confusing to other programmers or for you later on in the future.
4) If you use Hungarian notation, make sure that you use the correct prefix.
5) White-space is ignored in C++. Don't be afraid to add spaces in you program. For example:
1
2
3
4
5
6
7
8
9
10
11
// Difficult version:
int main( ){int iVar(3);return 0;}

// Cleaner version:
int main( )
{
    int iVar( 3 );
    
    return 0;
}

Last edited on
Topic archived. No new replies allowed.