c++ tutorials and lessons
I started wrting c lessons for absoulute begginers to advanced users, I think material can be considered quality, and my students learn programming with this stuff. If you wish feel free to start reading it.Its only 8 lessons for now so maybe could be easier for you to start following it now in the beginning. Hope I helped..materials will be published on daily base. Enjoy now, or later when I reach more advanced topics...
Also if you come across mistakes please comment them. thnks
--------------------------------------------------------------
http://www.visualcmaniac.com
Also if you come across mistakes please comment them. thnks
--------------------------------------------------------------
http://www.visualcmaniac.com
I am not seeing anything about pointers. Pointers should be taught right from the start, IMO, especially in C++. I'd put pointers right after explaining integers. I've seen my share of people going through a programming class and having completely missed out on pointers.
can someone help me how to format my code so it doens all come up like this with no spaces and tabs? i use blogger. thank you!
if (d > 0)
{
/* results are real numbers */
q = pow (d, 1./2);
x1 = (-b + q)/(2*a);
x2 = (-b - q)/(2*a);
printf ("X1=%f X2=%f\n", x1, x2);
}
else if (d == 0)
{
/* there’s only one result */
x1 = -b/(2*a);
printf ("X1=X2=%f\n", x1);
}
else
{
/* results are conjugated complex numbers */
q = pow(-d, 1./2);
x1r = -b/(2*a) ;
x2r = x1r;
x1i = q/(2*a);
x2i = -x1i;
printf ("X1 = (%f,%f)\n", x1r, x1i);
printf ("X2 = (%f,%f)\n", x2r, x2i);
}
}
if (d > 0)
{
/* results are real numbers */
q = pow (d, 1./2);
x1 = (-b + q)/(2*a);
x2 = (-b - q)/(2*a);
printf ("X1=%f X2=%f\n", x1, x2);
}
else if (d == 0)
{
/* there’s only one result */
x1 = -b/(2*a);
printf ("X1=X2=%f\n", x1);
}
else
{
/* results are conjugated complex numbers */
q = pow(-d, 1./2);
x1r = -b/(2*a) ;
x2r = x1r;
x1i = q/(2*a);
x2i = -x1i;
printf ("X1 = (%f,%f)\n", x1r, x1i);
printf ("X2 = (%f,%f)\n", x2r, x2i);
}
}
Use the <pre> tag.
Edit: If you want not only correct indentation but code coloring, check this pages:
http://www.manoli.net/csharpformat/ > select C# as your language - it works just fine for C & C++
http://colorer.sourceforge.net/php/ > select a Style -Eclipse, FMX & Bred3 are nice- and C++ as language, the autodetection doesn't always work
Edit: If you want not only correct indentation but code coloring, check this pages:
http://www.manoli.net/csharpformat/ > select C# as your language - it works just fine for C & C++
http://colorer.sourceforge.net/php/ > select a Style -Eclipse, FMX & Bred3 are nice- and C++ as language, the autodetection doesn't always work
yea, I never learned pointers quite right. I was PISSED at my instructor when I took the AP (got a 4, but still. Not bad for a freshman in high school). He doesn't know C from COBAL. ( a slight exageration).
It's not magic, it's Ruby.
My first lecturer in programming C (2nd year at uni) struggled with English. His notes were badly copied from a book (which I later bought - barring typos the explanations and example code were exactly the same). Since I couldn't figure out how to get anything to work based on his lectures and none of his examples worked I finally stopped going to the lectures and just learned from the book.
As for pointers, my copy of "C++ The Complete Reference" (not the book mentioned above) spends the first 10 chapters teaching standard C and covers pointers in chapter 5. Chapters 1-4 cover an overview of C, expressions (variable types, + - etc), statements (if, else etc), arrays and strings.
Actually it does mention pointers briefly in chapters 2 and 4, but not in great detail.
As for pointers, my copy of "C++ The Complete Reference" (not the book mentioned above) spends the first 10 chapters teaching standard C and covers pointers in chapter 5. Chapters 1-4 cover an overview of C, expressions (variable types, + - etc), statements (if, else etc), arrays and strings.
Actually it does mention pointers briefly in chapters 2 and 4, but not in great detail.
so what you think? is it better now with white background or did you like previous template more? (i liked blac one more, but this one should be easier to follow)
http://www.visualcmaniac.com
http://www.visualcmaniac.com

