i want to learn C programming on my own...do you know any book? online source? where can I download visual C..help please
C programming source for beginners...?
Well, first off, you are confusing two different languages - "C" is different than "Visual C", though they are related.
C is one of the older languages but its still very common. I'm also in the process of learning C and I'm currently using a Flash based seminar that you can download, called "Thinking in C". It progresses really fast, so you have to go through each chapter several times so you get a good grasp of it.
http://www.mindview.net/
There are tons of free C compilers out there - the one I downloaded is Dev-C++ (C is actually a subset of C++) from bloodshed software.
If you want some of the Visual compilers, MS has a free suite of them - just google "Visual Express" and it will come up.
Reply:www.cprogramming.com
Reply:"Beginning Programming for Dummies" is ok. I have it and it even comes with several editors, debuggers, and compilers. Not sure if there's a C one though.
There's probably a "C for Dummies" too, because there is a "C++ for Dummies."
Monday, May 24, 2010
Learning C/C++ programming?
I want to learn some C++ programming. I would like either a website or a good book to teach me it, and so it makes sense. I would need a good environment to then write the programs on my ... vista laptop.
Any other thoughts are appreciated!
Thanks a lot!
Learning C/C++ programming?
Well there are tons of free C++ and C compilers out there... one of the better books I used to learn was called "Beginning C++ Through Game Programming" by Michael Dawson. I don't do game programming, but honestly for object oriented programming it really does help to see it in these perspectives. This book will take you through the meat and guts at a rather rigorous pace for using console programming. Afterwards, you should have a good set up for doing WinForms or what ever other type of programming you might desire to do.
All that really makes C++ difficult in comparison to other OOP languages is wrapping your head around pointers ;)
Reply:Or else may be you can contact a C++ expert to speeden up learning. Check websites like http://askexpert.info/
Reply:To Lean C, if you want to learn thoroughly, you can use
"The C Language Handbook" by Weber Systems Staff
Reply:The best book on C++ is available for free here: http://www.mindview.net/Books/TICPP/Thin...
Here is a link for some free C++ compilers: http://www.thefreecountry.com/compilers/...
blue flowers
Any other thoughts are appreciated!
Thanks a lot!
Learning C/C++ programming?
Well there are tons of free C++ and C compilers out there... one of the better books I used to learn was called "Beginning C++ Through Game Programming" by Michael Dawson. I don't do game programming, but honestly for object oriented programming it really does help to see it in these perspectives. This book will take you through the meat and guts at a rather rigorous pace for using console programming. Afterwards, you should have a good set up for doing WinForms or what ever other type of programming you might desire to do.
All that really makes C++ difficult in comparison to other OOP languages is wrapping your head around pointers ;)
Reply:Or else may be you can contact a C++ expert to speeden up learning. Check websites like http://askexpert.info/
Reply:To Lean C, if you want to learn thoroughly, you can use
"The C Language Handbook" by Weber Systems Staff
Reply:The best book on C++ is available for free here: http://www.mindview.net/Books/TICPP/Thin...
Here is a link for some free C++ compilers: http://www.thefreecountry.com/compilers/...
blue flowers
Where can I find C programming language?
I want to learn C
I have purchased a tutorial book "Let us C"
I have a computer at home
I have downloaded compiler "turbo C"
but it's no working
I think C is not installed in my pc
Can anyone help me
Plz...
Where can I find C programming language?
Turbo C is old, may not be compatible with today's 32-bit OS.
C-Free 4.0 seems to be widely used, try the link below:
Reply:Contact with near computer shop,
they can help you to install C++ in your computer.
Reply:I use Dev-C++, you can give that a try.
http://www.bloodshed.net/dev/devcpp.html
Microsoft Visual C++ is probably the best one, but it costs money.
I have purchased a tutorial book "Let us C"
I have a computer at home
I have downloaded compiler "turbo C"
but it's no working
I think C is not installed in my pc
Can anyone help me
Plz...
Where can I find C programming language?
Turbo C is old, may not be compatible with today's 32-bit OS.
C-Free 4.0 seems to be widely used, try the link below:
Reply:Contact with near computer shop,
they can help you to install C++ in your computer.
Reply:I use Dev-C++, you can give that a try.
http://www.bloodshed.net/dev/devcpp.html
Microsoft Visual C++ is probably the best one, but it costs money.
C-programming...beginners..pro... plz help me out?
i need a program written in C on finding roots of a quadratic equations and finding the average of n even numbers. I need the programming. Or plz refer any website from where i can download the same. got assignment tommorow.
C-programming...beginners..pro... plz help me out?
Well Ill tell ya. If this is the type of student you are then the teacher is going to know you didnt write the code.
So you get a zero on the assignment or you receive a zero and punished for cheating.
Do your assignments on time and study more...any other answer to this question is morally corrupt.
Reply:Here u'll find dat
Reply:#include%26lt;stdio.h%26gt;
#include%26lt;math.h%26gt;
void main()
{
int a,b,c;
printf("enter the values of a b %26amp;c");
scanf("%d %d %d",%26amp;a,%26amp;b,%26amp;c);
if(b*b%26gt;=4*a*c)
{
rt1=(-b*b+sqrt(b*b-4*a*c))/(2*a);
rt2=(-b*b-sqrt(b*b-4*a*c))/(2*a);
}
else
printf("complex roots");
}
//average of n numbers
#include%26lt;stdio.h%26gt;
void main()
{
int num[100],n=1;i=1;
printf("enter the total no of numbers u want to enter");
scanf("%d",%26amp;n);
#include%26lt;stdio.h%26gt;
#include%26lt;math.h%26gt;
void main()
{
int a,b,c;
printf("enter the values of a b %26amp;c");
scanf("%d %d %d",%26amp;a,%26amp;b,%26amp;c);
if(b*b%26gt;=4*a*c)
{
rt1=(-b*b+sqrt(b*b-4*a*c))/(2*a);
rt2=(-b*b-sqrt(b*b-4*a*c))/(2*a);
}
else
printf("complex roots");
}
//average of n numbers
#include%26lt;stdio.h%26gt;
void main()
{
float num[100],n=1;i=1,sum=0;avg=0;
printf("enter the total no of numbers u want to enter1%26lt;=n%26lt;=100");
scanf("%f",%26amp;num[i-1]);
for(i=1;i%26lt;=n;i++)
{
printf("enter the new number ");
scanf("%f",%26amp;i);
}
for(i=1;i%26lt;=n;i++)
{
sum=sum+num[i-1];
}
avg=sum/n;
printf("the average of %f nos is:%f",n,avg);
}
C-programming...beginners..pro... plz help me out?
Well Ill tell ya. If this is the type of student you are then the teacher is going to know you didnt write the code.
So you get a zero on the assignment or you receive a zero and punished for cheating.
Do your assignments on time and study more...any other answer to this question is morally corrupt.
Reply:Here u'll find dat
Reply:#include%26lt;stdio.h%26gt;
#include%26lt;math.h%26gt;
void main()
{
int a,b,c;
printf("enter the values of a b %26amp;c");
scanf("%d %d %d",%26amp;a,%26amp;b,%26amp;c);
if(b*b%26gt;=4*a*c)
{
rt1=(-b*b+sqrt(b*b-4*a*c))/(2*a);
rt2=(-b*b-sqrt(b*b-4*a*c))/(2*a);
}
else
printf("complex roots");
}
//average of n numbers
#include%26lt;stdio.h%26gt;
void main()
{
int num[100],n=1;i=1;
printf("enter the total no of numbers u want to enter");
scanf("%d",%26amp;n);
#include%26lt;stdio.h%26gt;
#include%26lt;math.h%26gt;
void main()
{
int a,b,c;
printf("enter the values of a b %26amp;c");
scanf("%d %d %d",%26amp;a,%26amp;b,%26amp;c);
if(b*b%26gt;=4*a*c)
{
rt1=(-b*b+sqrt(b*b-4*a*c))/(2*a);
rt2=(-b*b-sqrt(b*b-4*a*c))/(2*a);
}
else
printf("complex roots");
}
//average of n numbers
#include%26lt;stdio.h%26gt;
void main()
{
float num[100],n=1;i=1,sum=0;avg=0;
printf("enter the total no of numbers u want to enter1%26lt;=n%26lt;=100");
scanf("%f",%26amp;num[i-1]);
for(i=1;i%26lt;=n;i++)
{
printf("enter the new number ");
scanf("%f",%26amp;i);
}
for(i=1;i%26lt;=n;i++)
{
sum=sum+num[i-1];
}
avg=sum/n;
printf("the average of %f nos is:%f",n,avg);
}
How can i write a c language program to determine whether 4 digits are palindrome or no?
please help just by telling me how can i define palindrome in C program, i don't want the whole program.
How can i write a c language program to determine whether 4 digits are palindrome or no?
If you are only worried about 4 digits then:
If variable s is the 4 digit string
If (s[0] is equal to s[3]) and (s[1] is equal to s[2]) then it is a 4 digit palindrome.
Use your knowledge of C to implement this suedo code.
==Edit==
* Sheqi actually has an elegant solution (I gave it a thumbs up) but reversing the 4 digit is an extra step you don't need.
* richarduie has an example of what I said.
* I'm not sure what Alexanders code does without tracing it. It might work if when you said "digits" you meant numbers but I would trace it before I handed that one in.
* Curious George has some C++ code so don't copy that verbatim to answer your "C" question. It will just raise eyebrows.
Reply:This will work for any number of type "int":
int a = /*needed number*/;
int x = 0;
int z = a;
while (z)
{
x *= 10;
x += z%10;
z /= 10;
}
if (x==a)
{
/*number is a palindrome*/
}
else
{
/*number isn't a palindrome*/
}
Reply:bool isPalindrome(const std::string %26amp;str)
{
std::string::const_reverse_iterator itEnd = str.rbegin()++;
for (std::string::const_iterator itStart = str.begin(); itStart %26lt; itEnd.base(); ++itStart, ++itEnd)
{
if (*itStart != *itEnd)
{
return false;
}
} return true;
}
Reply:For a four-digit number, break the number into digits. For instance, 5678 would decompose into 5, 6, 7, 8. Compare the first and last for equality. Compare the second and third for equality. If both pairs are equal, the number is palindromic.
E.g.,
2452 --%26gt; (2 == 2) %26amp;%26amp; (4 == 5) --%26gt; true %26amp;%26amp; false --%26gt; false
3663 --%26gt; (3 == 3) %26amp;%26amp; (6 == 6) --%26gt; true %26amp;%26amp; true --%26gt; true
2452 is not a palindormic number; 3663 is.
Reply:A palindrome is a word, phrase, number or other sequence of units that has the property of reading the same in either direction.
Reverse the order of the string and compare with the original.
How can i write a c language program to determine whether 4 digits are palindrome or no?
If you are only worried about 4 digits then:
If variable s is the 4 digit string
If (s[0] is equal to s[3]) and (s[1] is equal to s[2]) then it is a 4 digit palindrome.
Use your knowledge of C to implement this suedo code.
==Edit==
* Sheqi actually has an elegant solution (I gave it a thumbs up) but reversing the 4 digit is an extra step you don't need.
* richarduie has an example of what I said.
* I'm not sure what Alexanders code does without tracing it. It might work if when you said "digits" you meant numbers but I would trace it before I handed that one in.
* Curious George has some C++ code so don't copy that verbatim to answer your "C" question. It will just raise eyebrows.
Reply:This will work for any number of type "int":
int a = /*needed number*/;
int x = 0;
int z = a;
while (z)
{
x *= 10;
x += z%10;
z /= 10;
}
if (x==a)
{
/*number is a palindrome*/
}
else
{
/*number isn't a palindrome*/
}
Reply:bool isPalindrome(const std::string %26amp;str)
{
std::string::const_reverse_iterator itEnd = str.rbegin()++;
for (std::string::const_iterator itStart = str.begin(); itStart %26lt; itEnd.base(); ++itStart, ++itEnd)
{
if (*itStart != *itEnd)
{
return false;
}
} return true;
}
Reply:For a four-digit number, break the number into digits. For instance, 5678 would decompose into 5, 6, 7, 8. Compare the first and last for equality. Compare the second and third for equality. If both pairs are equal, the number is palindromic.
E.g.,
2452 --%26gt; (2 == 2) %26amp;%26amp; (4 == 5) --%26gt; true %26amp;%26amp; false --%26gt; false
3663 --%26gt; (3 == 3) %26amp;%26amp; (6 == 6) --%26gt; true %26amp;%26amp; true --%26gt; true
2452 is not a palindormic number; 3663 is.
Reply:A palindrome is a word, phrase, number or other sequence of units that has the property of reading the same in either direction.
Reverse the order of the string and compare with the original.
IN TURBO C PROGRAMMING LANGUAGE, WHAT IS THE FUNCTION OF keys.h ??? IS THERE A SAMPLE CODE??
IN TURBO C PROGRAMMING LANGUAGE, WHAT IS THE FUNCTION OF keys.h ??? IS THERE A SAMPLE CODE??
IN TURBO C PROGRAMMING LANGUAGE, WHAT IS THE FUNCTION OF keys.h ??? IS THERE A SAMPLE CODE??
#define TRUE 1
#define FALSE 0
#define ESC 27
#define F2 188
#define UP 200
#define FWD 205
#define DN 208
#define BS 203
int getkey(void);
int keyhit(void);
void curr_cursor(int *, int *);
void cursor(int, int);
void hidecursor(void);
void unhidecursor(void);
void savecursor(void);
void restorecursor(void);
void set_cursor_type(unsigned);
#define normalcursor() set_cursor_type(0x0607)
look at this code to understand how each function works.
http://202.179.135.4/data/DDJ/articles/1...
Reply:It appears that the question period has expired. If you have received an answer that meets your needs, _please_ choose one of those as a 'best answer' as soon as you can; otherwise, this question will go to an automatic vote. If you haven't received a good answer for your question, you may want to consider the following,
1) Remove this version of your question and re-post your question. Newer questions get more activity on Yahoo! Answers than old ones.
2) If you do re-post your question, consider why it wasn't answered the first time. Could it be more specific? Could it be worded better? Were there grammatical or spelling errors? Was it in the best category? Can you provide more helpful details?
If it doesn't seem likely that re-posting your question will help you, then here's a listing of my favorite 'answer sites'. Maybe one of them will help you.
Answers.com http://www.answers.com/
Bartleby http://www.bartleby.com/
Yahoo Reference http://education.yahoo.com/reference/
HowStuffWorks http://www.howstuffworks.com/
Wikipedia http://en.wikipedia.org/wiki/Main_Page
Since I really haven't answered your question, it is not necessary to give me any points. Regards.
white flowers
IN TURBO C PROGRAMMING LANGUAGE, WHAT IS THE FUNCTION OF keys.h ??? IS THERE A SAMPLE CODE??
#define TRUE 1
#define FALSE 0
#define ESC 27
#define F2 188
#define UP 200
#define FWD 205
#define DN 208
#define BS 203
int getkey(void);
int keyhit(void);
void curr_cursor(int *, int *);
void cursor(int, int);
void hidecursor(void);
void unhidecursor(void);
void savecursor(void);
void restorecursor(void);
void set_cursor_type(unsigned);
#define normalcursor() set_cursor_type(0x0607)
look at this code to understand how each function works.
http://202.179.135.4/data/DDJ/articles/1...
Reply:It appears that the question period has expired. If you have received an answer that meets your needs, _please_ choose one of those as a 'best answer' as soon as you can; otherwise, this question will go to an automatic vote. If you haven't received a good answer for your question, you may want to consider the following,
1) Remove this version of your question and re-post your question. Newer questions get more activity on Yahoo! Answers than old ones.
2) If you do re-post your question, consider why it wasn't answered the first time. Could it be more specific? Could it be worded better? Were there grammatical or spelling errors? Was it in the best category? Can you provide more helpful details?
If it doesn't seem likely that re-posting your question will help you, then here's a listing of my favorite 'answer sites'. Maybe one of them will help you.
Answers.com http://www.answers.com/
Bartleby http://www.bartleby.com/
Yahoo Reference http://education.yahoo.com/reference/
HowStuffWorks http://www.howstuffworks.com/
Wikipedia http://en.wikipedia.org/wiki/Main_Page
Since I really haven't answered your question, it is not necessary to give me any points. Regards.
white flowers
C Programming error message?
C Programming error?
Hi, just started programming in C for uni.
Here's the relevant part of the program:
#define SIZE 100
{ int day_n, dayn;
char day[SIZE];
...
day_n = %26lt;some function%26gt;;
dayn = day_n%7;
if (dayn==0) day="Saturday";
else if (dayn==1) day="Sunday";
%26lt;etc%26gt;
printf("The day is a %c\n", day)
}
I keep getting error for each line with day in it:
left operand must be modifiable lvalue: op "="
I don't know what this means, or how to fix it, please help!
(I know this isn't the best way of writing it, but I can't be bothered to use a switch statement now!)
C Programming error message?
You can't copy a string like that.
look up strcpy().
Or, do something like this.
if(dayn==0)
printf("The day is Saturday")
if(dayn==1)
printf("The day is Sunday")
Reply:day_n and dayn are integers
enum {SATURDAY,SUNDAY...FRIDAY};
if(day_n == SATURDAY) // the enumerated value of SATURDAY is 0
strcpy(day,"SATURDAY"); // NOTE quoted string is not an integer
if(day_n == SUNDAY) // the enumerated value of SUNDAY is 1
strcpy(day,"SUNDAY");
etc...
?cant be bothered with a switch?
tm_horton@yahoo.com as I can help
Hi, just started programming in C for uni.
Here's the relevant part of the program:
#define SIZE 100
{ int day_n, dayn;
char day[SIZE];
...
day_n = %26lt;some function%26gt;;
dayn = day_n%7;
if (dayn==0) day="Saturday";
else if (dayn==1) day="Sunday";
%26lt;etc%26gt;
printf("The day is a %c\n", day)
}
I keep getting error for each line with day in it:
left operand must be modifiable lvalue: op "="
I don't know what this means, or how to fix it, please help!
(I know this isn't the best way of writing it, but I can't be bothered to use a switch statement now!)
C Programming error message?
You can't copy a string like that.
look up strcpy().
Or, do something like this.
if(dayn==0)
printf("The day is Saturday")
if(dayn==1)
printf("The day is Sunday")
Reply:day_n and dayn are integers
enum {SATURDAY,SUNDAY...FRIDAY};
if(day_n == SATURDAY) // the enumerated value of SATURDAY is 0
strcpy(day,"SATURDAY"); // NOTE quoted string is not an integer
if(day_n == SUNDAY) // the enumerated value of SUNDAY is 1
strcpy(day,"SUNDAY");
etc...
?cant be bothered with a switch?
tm_horton@yahoo.com as I can help
Win32 Dev-C++ Programming Tutorials?
Im learning C++ and Im using Dev-C++ and Im trying Win32 but all the online tutorials I find (along with the book I bought) mainly talk about C++ Console Programming and not the Win32 Window programming so can anyone give me some good links as I cant ever right a word in my window!
Win32 Dev-C++ Programming Tutorials?
Well, use Visual C++ Express for that anyway. It's much better and it has an editor and such. At least untill you get a better understanding of how everything works.
You really don't need a tutorial on Windows programming, because to do it you should have enough knowledge of console programming just to read the MSDN site and pick up what you need.
Reply:Dev, by itself helps you to get started. Open Dev up, goto file, create new project, and then select create new windows application. That will give you a bare-bones, ready to compile win32 app. A simple window without controls. To understand how to create controls (ie. buttons), follow the links below. It's not really that difficult to get started, only to master.
http://winprog.org/tutorial/
http://winapi.foosyerdoos.org.uk/index.p...
Reply:exactly.
Reply:Here is a link for setting up Express 2005 to be able to do Win32 programming:
http://msdn.microsoft.com/vstudio/expres...
It involves using the "platform sdk". I've done it, so it does work.
Borland/CodeGear has their Turbo-C ++ ide available for free, and you can do Win32 and VCL programming.
Win32 Dev-C++ Programming Tutorials?
Well, use Visual C++ Express for that anyway. It's much better and it has an editor and such. At least untill you get a better understanding of how everything works.
You really don't need a tutorial on Windows programming, because to do it you should have enough knowledge of console programming just to read the MSDN site and pick up what you need.
Reply:Dev, by itself helps you to get started. Open Dev up, goto file, create new project, and then select create new windows application. That will give you a bare-bones, ready to compile win32 app. A simple window without controls. To understand how to create controls (ie. buttons), follow the links below. It's not really that difficult to get started, only to master.
http://winprog.org/tutorial/
http://winapi.foosyerdoos.org.uk/index.p...
Reply:exactly.
Reply:Here is a link for setting up Express 2005 to be able to do Win32 programming:
http://msdn.microsoft.com/vstudio/expres...
It involves using the "platform sdk". I've done it, so it does work.
Borland/CodeGear has their Turbo-C ++ ide available for free, and you can do Win32 and VCL programming.
C++ and Opengl / VRML programming?
I know C and C++ programming.
I have to learn the languages:
opengl, directx9, opencv, and VRML language.
what language(s) will i be able to learn more easily with the c/c++ background?
C++ and Opengl / VRML programming?
download source codes for games and make your own code and find some new game you might like.
I have to learn the languages:
opengl, directx9, opencv, and VRML language.
what language(s) will i be able to learn more easily with the c/c++ background?
C++ and Opengl / VRML programming?
download source codes for games and make your own code and find some new game you might like.
Help, Beginner's Question on C++ Language & Programming?
I have no knowledge or exp. of any programming language. Basically I am a beginner, I'm majoring in engineering requiring me to take courses in C++ Prog. I will be taking "Intro to C++ Programming" this Fall. (Description: design algorithms, write int./ext. docs, source codes) Assuming the class will be full of computer science majors, I don't want to look stupid.
1) Can anyone give me a brief summary of what I might be getting myself into, any advice?
2) Does C++ involve any math? What level?
3) Is there anything I should do to prepare for this course?
Any links to useful websites are appreciated..
Help, Beginner's Question on C++ Language %26amp; Programming?
The programming class will be broken into two parts: lecture and lab. Most introductory programming languages have books that are essentially primers. Some common features of introductory programming books are:
An easy to use, friendly guide.
A primer doesn't assume that you already are familiar with all relevant programming concepts.
A primer emphasizes hands-on learning with brief, easily typed examples that develop your understanding—one concept at a time.
A primer clarifies concepts with illustrations.
A primer provides exercises to let you test your understanding, making the book suitable for self-learning or for the classroom.
A beginning C++ book presents C++ fundamentals and illustrates them with short, to-the-point programs that are easy to copy, and to experiment with. The book is not intended to provide encyclopedic coverage of all features and nuaances of the C++ language. But it should present the most important aspects—while laying the foundation for further study.
If your class textbook doesn't accomplish the above to your satisfaction then, please do some outside reading and exercises, i.e., library books. it is important that you do not only the reading, but also complete all of the lab assignments.
You'll learn about the input and output, how to make programs perform repetitive tasks and make choices, the many way to handle and work with data, and how to use small packets of re-usable code: functions and subroutines.
You'll learn about the important object-oriented programming concepts of information hiding (lots of fun), polymorphism (not as bad as it sounds), and inheritance.
By the end, you should be able to write solid, effective programs, and hopefully enjoy yourself doing so.
Many universities do have a separate course in programming mathematics. However, programming is more geared toward logic and following a very structured language.
To prepare yourself for formal C++ instruction, familiarize yourself with the basic concepts. You can get books from a library or bookstore. Remember, the more knowledge and experience you take into a learning situation, the more you will get out of it.
I suggest that you google for C++ tutorials. Below I list a few on-line resources. I also recommend that—while you are learning the concepts—you write as many small programs as possible. This reinforces your knowledge, and improves your analytical skills as well. And finally, if you can find a great study partner then, it might make learning a bit easier..
Good luck.
---------------
C++ Tutorials:
http://www.cprogramming.com/tutorial.htm...
http://www.java2s.com/Tutorial/Cpp/Catal...
---------------
C++ Concepts:
http://www.codeproject.com/vb/net/
http://www.cplusplus.com/
http://www.samspublishing.com/articles/i...
Reply:My first language was C++. Go ahead and buy a book on C++ from Barnes and Nobles or some other book store if you want. A beginners book of course, a see what it's like. It will involve math. Knowing some calculus is probably preferable. Knowing logic is even more important...ie if then and or. It might be helpful to look up recursion in your new book and see if you can't figure out what they are talking about there. The main thing to remember though, is that it is an intro course, so don't worry about it too much. Your professor should lead you through it.
Reply:If you are a logical person you wil have no problem. Don't prepare, it's an intro course... go with it.
What goes overlooked by MOST people, even those that are software developers, is that algorithms ( http://www.answers.com/algorithm?cat=biz... ) are the key (which are written in english, not C++) and that is why your engineering degree requires it.
Programming languages (whether C++, Java, etc.) are simply a bunch of keywords and constructs (easy to learn in a couple weeks) that algorithms get translated into so the computer can solve the problem instead of a person.
The emphasis in this course will NOT be on writing C++, but to use it as the preferred tool to solve problem (and in your class these problems will not be related to the real world, but simple, academic problems like determining if a word is a palindrome).
C++ (like Java and C#) are unique and preferred because they are 'object-oriented' (OO) languages ( http://www.answers.com/topic/object-orie... ) as opposed to procedural languages like BASIC and C and Javascript.
If you have no previous procedural language experience it will be easier to grasp object oriented programming, which will be the most difficult thing to learn in order to start using C++ (you may want to just look for primers on OO programming). HTML is NOT a programming language but rather markup language (hence the ML in HTML).
Java or C# are WAY less cryptic and would be better for an intro course.
Good luck... enjoy.
(no offense to 'csanon' but that response is WAY off base.)
Reply:Answer to question 1:
It’s very hard to study English literature if you don’t know English. Likewise, if you want to study computer science, you’ll need to know at least one, if not more computer languages. Your course is teaching one such language (C++). You’ll end up doing a bit of computer science, very little but enough for a complete beginner. Mostly, you’ll focus on how C++ works.
C++ is a great language, but it’s a pretty bad language for a complete beginner. There’s a tremendous number of horribly written (mostly obsolete and inaccurate) learning resources, and C++ is a difficult language for various reasons (small core library, historic quirks). But it’s also the best systems level language, which is probably why your university chose to teach it. If you aren’t pursuing computer science, C++ isn’t really worth your time. If you are, well that’s that.
Expect some frustration. If by some good stroke of luck you have knowledgeable professors and TAs, you’re fine. Otherwise, you’ll have to figure out things on your own, and that can get painful when faced with short deadlines. C++ has a pretty long learning curve. If you have trouble with the computer science part, that’s even more problematic.
Answer to question 2:
C++ itself involves no math. The three paradigms it strongly involves are procedural, OO, and template programming. None of these are math or logic based paradigms. However, computer science is strongly related to mathematics. You’ll touch upon the very basics of computer science, so you won’t face difficult mathematics. However, you should be able to figure out logically the solution to problems, and in addition, you probably will have to derive algorithms. Again, this is all very very basic, but when people have trouble at this level, they really have trouble.
Answer to question 3:
There are things you can do to prepare. The first is getting good C++ learning resources. I know those college textbooks are expensive, but if you get a bad book from the course, you’ll have more trouble than necessary. There’s a number of ideal books for beginners, but since I have no idea how your course will be laid out, I recommend C++ Primer (4th Edition) by Lippman. Lippman is one of the recognized C++ experts and his book is also recognized by C++ programmers. There’s other useful books for C++ beginners, but I won’t recommend them because as I said I don’t know if you are serious about C++ and how your course will be laid out.
The second thing is finding good help resources. Yahoo Answers isn’t one of them. If you have knowledgeable friends (not classmates!) who are advanced CS students, and really, really know C++, you can ask them for help. Bad advice is really bad though, so avoid them if you aren’t sure. Find good help forums. http://cboard.cprogramming.com/ , http://forums.devshed.com/ , and http://www.daniweb.com/ are all good places to hang out. You can also tap into the usenet groups: http://groups.google.com/group/comp.lang... and http://groups.google.com/group/comp.lang... are frequented by advanced C++ programmers, some of the book authors, the inventor of C++, people who make up the C++ standards, and so on, but you can ask for help on generic C++ questions there. Just be careful, don’t dump your homework questions there. The standards for asking questions are pretty high there.
Remember to Google. You’ll want to know about http://c-faq.com/ and http://www.parashift.com/c++-faq-lite/ . You’ll want references to the standard library. You can google them, although cplusplus.com and cppreference.com are useful references for the library. So is SGI’s STLPort documentation.
Reply:Pay especially careful attention to the algorithms part. While documentation is important, and usually graded as such, if you understand what your teacher and the literature is telling you about how to do things, then the rest should be straightforward.
For an introductory programming course, the thing to remember is you don't have much perspective yet. The school will probably have good reasons for choosing this or that language, but you are learning the language and the discipline and it is very possible that if you study ahead (focusing on C++) you may find that what you have studied are the wrong things. The same may be true of your fellow students.
On this topic, the Wikipedia is a very good resource. Since the content is user-generated, it does have some flaws, but it has such a wide variety of contributors, especially on computer-related subjects, that as an introduction to many subjects it is as good as the sites which limit their contributions to certified "experts". I know there are arguments going on about this right now, but we're talking about the Wikipedia when it is read critically. You will get your textbooks in August or September. They should be what you need for the specifics of how you are going to get through the class. Any general introduction to the subject of programming should help. If only by putting your mind at ease.
Reply:As long as you have a good instructor, you should be fine. Also, any intro to programming class shouldn't have any expectations that the students taking it have any programming experience. C++ is a very easy language to learn. This is probably what you will do on the first or second day of class:
http://www.hitmill.com/programming/cpp/h...
No programming language requires math, but since you are already an engineering major, you should be adept enough at any math that gets thrown at you. I wouldn't expect anything as complicated as even Calc 1, but you never know. Good luck with the class!
Reply:dont worry itll be real simple. You'll probably want to get familiar with a command line interface though as most of your first programs will be command line apps. Im assuming your in windows so get cygwin which is like a unix command shell on windows and you can install a C++ compiler. read the docs to find out how to use it but that will be a very easy way to get started.
Reply:you will want to get a hang of some easier languages first
Start with html move on to BASIC, then VB etc....
song lyrics
1) Can anyone give me a brief summary of what I might be getting myself into, any advice?
2) Does C++ involve any math? What level?
3) Is there anything I should do to prepare for this course?
Any links to useful websites are appreciated..
Help, Beginner's Question on C++ Language %26amp; Programming?
The programming class will be broken into two parts: lecture and lab. Most introductory programming languages have books that are essentially primers. Some common features of introductory programming books are:
An easy to use, friendly guide.
A primer doesn't assume that you already are familiar with all relevant programming concepts.
A primer emphasizes hands-on learning with brief, easily typed examples that develop your understanding—one concept at a time.
A primer clarifies concepts with illustrations.
A primer provides exercises to let you test your understanding, making the book suitable for self-learning or for the classroom.
A beginning C++ book presents C++ fundamentals and illustrates them with short, to-the-point programs that are easy to copy, and to experiment with. The book is not intended to provide encyclopedic coverage of all features and nuaances of the C++ language. But it should present the most important aspects—while laying the foundation for further study.
If your class textbook doesn't accomplish the above to your satisfaction then, please do some outside reading and exercises, i.e., library books. it is important that you do not only the reading, but also complete all of the lab assignments.
You'll learn about the input and output, how to make programs perform repetitive tasks and make choices, the many way to handle and work with data, and how to use small packets of re-usable code: functions and subroutines.
You'll learn about the important object-oriented programming concepts of information hiding (lots of fun), polymorphism (not as bad as it sounds), and inheritance.
By the end, you should be able to write solid, effective programs, and hopefully enjoy yourself doing so.
Many universities do have a separate course in programming mathematics. However, programming is more geared toward logic and following a very structured language.
To prepare yourself for formal C++ instruction, familiarize yourself with the basic concepts. You can get books from a library or bookstore. Remember, the more knowledge and experience you take into a learning situation, the more you will get out of it.
I suggest that you google for C++ tutorials. Below I list a few on-line resources. I also recommend that—while you are learning the concepts—you write as many small programs as possible. This reinforces your knowledge, and improves your analytical skills as well. And finally, if you can find a great study partner then, it might make learning a bit easier..
Good luck.
---------------
C++ Tutorials:
http://www.cprogramming.com/tutorial.htm...
http://www.java2s.com/Tutorial/Cpp/Catal...
---------------
C++ Concepts:
http://www.codeproject.com/vb/net/
http://www.cplusplus.com/
http://www.samspublishing.com/articles/i...
Reply:My first language was C++. Go ahead and buy a book on C++ from Barnes and Nobles or some other book store if you want. A beginners book of course, a see what it's like. It will involve math. Knowing some calculus is probably preferable. Knowing logic is even more important...ie if then and or. It might be helpful to look up recursion in your new book and see if you can't figure out what they are talking about there. The main thing to remember though, is that it is an intro course, so don't worry about it too much. Your professor should lead you through it.
Reply:If you are a logical person you wil have no problem. Don't prepare, it's an intro course... go with it.
What goes overlooked by MOST people, even those that are software developers, is that algorithms ( http://www.answers.com/algorithm?cat=biz... ) are the key (which are written in english, not C++) and that is why your engineering degree requires it.
Programming languages (whether C++, Java, etc.) are simply a bunch of keywords and constructs (easy to learn in a couple weeks) that algorithms get translated into so the computer can solve the problem instead of a person.
The emphasis in this course will NOT be on writing C++, but to use it as the preferred tool to solve problem (and in your class these problems will not be related to the real world, but simple, academic problems like determining if a word is a palindrome).
C++ (like Java and C#) are unique and preferred because they are 'object-oriented' (OO) languages ( http://www.answers.com/topic/object-orie... ) as opposed to procedural languages like BASIC and C and Javascript.
If you have no previous procedural language experience it will be easier to grasp object oriented programming, which will be the most difficult thing to learn in order to start using C++ (you may want to just look for primers on OO programming). HTML is NOT a programming language but rather markup language (hence the ML in HTML).
Java or C# are WAY less cryptic and would be better for an intro course.
Good luck... enjoy.
(no offense to 'csanon' but that response is WAY off base.)
Reply:Answer to question 1:
It’s very hard to study English literature if you don’t know English. Likewise, if you want to study computer science, you’ll need to know at least one, if not more computer languages. Your course is teaching one such language (C++). You’ll end up doing a bit of computer science, very little but enough for a complete beginner. Mostly, you’ll focus on how C++ works.
C++ is a great language, but it’s a pretty bad language for a complete beginner. There’s a tremendous number of horribly written (mostly obsolete and inaccurate) learning resources, and C++ is a difficult language for various reasons (small core library, historic quirks). But it’s also the best systems level language, which is probably why your university chose to teach it. If you aren’t pursuing computer science, C++ isn’t really worth your time. If you are, well that’s that.
Expect some frustration. If by some good stroke of luck you have knowledgeable professors and TAs, you’re fine. Otherwise, you’ll have to figure out things on your own, and that can get painful when faced with short deadlines. C++ has a pretty long learning curve. If you have trouble with the computer science part, that’s even more problematic.
Answer to question 2:
C++ itself involves no math. The three paradigms it strongly involves are procedural, OO, and template programming. None of these are math or logic based paradigms. However, computer science is strongly related to mathematics. You’ll touch upon the very basics of computer science, so you won’t face difficult mathematics. However, you should be able to figure out logically the solution to problems, and in addition, you probably will have to derive algorithms. Again, this is all very very basic, but when people have trouble at this level, they really have trouble.
Answer to question 3:
There are things you can do to prepare. The first is getting good C++ learning resources. I know those college textbooks are expensive, but if you get a bad book from the course, you’ll have more trouble than necessary. There’s a number of ideal books for beginners, but since I have no idea how your course will be laid out, I recommend C++ Primer (4th Edition) by Lippman. Lippman is one of the recognized C++ experts and his book is also recognized by C++ programmers. There’s other useful books for C++ beginners, but I won’t recommend them because as I said I don’t know if you are serious about C++ and how your course will be laid out.
The second thing is finding good help resources. Yahoo Answers isn’t one of them. If you have knowledgeable friends (not classmates!) who are advanced CS students, and really, really know C++, you can ask them for help. Bad advice is really bad though, so avoid them if you aren’t sure. Find good help forums. http://cboard.cprogramming.com/ , http://forums.devshed.com/ , and http://www.daniweb.com/ are all good places to hang out. You can also tap into the usenet groups: http://groups.google.com/group/comp.lang... and http://groups.google.com/group/comp.lang... are frequented by advanced C++ programmers, some of the book authors, the inventor of C++, people who make up the C++ standards, and so on, but you can ask for help on generic C++ questions there. Just be careful, don’t dump your homework questions there. The standards for asking questions are pretty high there.
Remember to Google. You’ll want to know about http://c-faq.com/ and http://www.parashift.com/c++-faq-lite/ . You’ll want references to the standard library. You can google them, although cplusplus.com and cppreference.com are useful references for the library. So is SGI’s STLPort documentation.
Reply:Pay especially careful attention to the algorithms part. While documentation is important, and usually graded as such, if you understand what your teacher and the literature is telling you about how to do things, then the rest should be straightforward.
For an introductory programming course, the thing to remember is you don't have much perspective yet. The school will probably have good reasons for choosing this or that language, but you are learning the language and the discipline and it is very possible that if you study ahead (focusing on C++) you may find that what you have studied are the wrong things. The same may be true of your fellow students.
On this topic, the Wikipedia is a very good resource. Since the content is user-generated, it does have some flaws, but it has such a wide variety of contributors, especially on computer-related subjects, that as an introduction to many subjects it is as good as the sites which limit their contributions to certified "experts". I know there are arguments going on about this right now, but we're talking about the Wikipedia when it is read critically. You will get your textbooks in August or September. They should be what you need for the specifics of how you are going to get through the class. Any general introduction to the subject of programming should help. If only by putting your mind at ease.
Reply:As long as you have a good instructor, you should be fine. Also, any intro to programming class shouldn't have any expectations that the students taking it have any programming experience. C++ is a very easy language to learn. This is probably what you will do on the first or second day of class:
http://www.hitmill.com/programming/cpp/h...
No programming language requires math, but since you are already an engineering major, you should be adept enough at any math that gets thrown at you. I wouldn't expect anything as complicated as even Calc 1, but you never know. Good luck with the class!
Reply:dont worry itll be real simple. You'll probably want to get familiar with a command line interface though as most of your first programs will be command line apps. Im assuming your in windows so get cygwin which is like a unix command shell on windows and you can install a C++ compiler. read the docs to find out how to use it but that will be a very easy way to get started.
Reply:you will want to get a hang of some easier languages first
Start with html move on to BASIC, then VB etc....
song lyrics
I want to learn C programming quickly...?
Hello everyone,
Can you please suggest me the best book to practice and improve my basic skills in c programming...
I have studied "C language" 1 year ago and then I stopped it now I need to remember all and get more programming skills..
Please help me to find good book to practice C programming.
I used Deitel's C book, but I found it so boring...
is there any other best choice?!
I want to learn C programming quickly...?
If you have forgotten "C language" then you should buy book "Programming In ANSI C" by balaguruswami of india.
The book has lots of examples and it has good language for a learner.
Reply:Try Sam teaches you C series of books.They are really interesting.
Also try "Programming In ANSI C" by Balaguruswamy. I use his book
Reply:there are a lot of books out there. It really depends on the reader on how appealing the author is. try samms teach your self series books :)
Reply:I think you should go to this wbsite called www.cprogramming.com. It is very useful. I would suggest that you learn java before learning c because it gives a better idea about programming for begginers.
Can you please suggest me the best book to practice and improve my basic skills in c programming...
I have studied "C language" 1 year ago and then I stopped it now I need to remember all and get more programming skills..
Please help me to find good book to practice C programming.
I used Deitel's C book, but I found it so boring...
is there any other best choice?!
I want to learn C programming quickly...?
If you have forgotten "C language" then you should buy book "Programming In ANSI C" by balaguruswami of india.
The book has lots of examples and it has good language for a learner.
Reply:Try Sam teaches you C series of books.They are really interesting.
Also try "Programming In ANSI C" by Balaguruswamy. I use his book
Reply:there are a lot of books out there. It really depends on the reader on how appealing the author is. try samms teach your self series books :)
Reply:I think you should go to this wbsite called www.cprogramming.com. It is very useful. I would suggest that you learn java before learning c because it gives a better idea about programming for begginers.
Bluetooth programming in c?
IS it possible to do programming in c for bluetooth?????
if yes
then can somebody send me c program code for small bluetooth program to me
Thank You
Bluetooth programming in c?
Of course you can.
Here is the "c program code for small bluetooth program":
#include %26lt;bluetooth.h%26gt;
int main() {
return 0;
}
if yes
then can somebody send me c program code for small bluetooth program to me
Thank You
Bluetooth programming in c?
Of course you can.
Here is the "c program code for small bluetooth program":
#include %26lt;bluetooth.h%26gt;
int main() {
return 0;
}
How do I program c code output to the parallel port?
I am trying to transmit characters thuough the parallel port using c code on a Win98 machine.
How do I program c code output to the parallel port?
I've never tried this myself, but is your program going to be a Windows based one, or a console (dos box) style one?
For a console program, I suspect you can open the file "lpt1" or maybe "prn" (or maybe "lpt1:" or "prn:") and start sending and maybe receiving characters from it as if it were some type of file stream. For example, I vaguely recall being able to do something like this in the past from a command prompt:
echo "this will be printed" %26gt; lpt1
But if you are writing a Windows program, you probably need some kind of Windows API function calls. A little research on that turned up this page:
http://msdn.microsoft.com/library/defaul...
Hope this helps.
How do I program c code output to the parallel port?
I've never tried this myself, but is your program going to be a Windows based one, or a console (dos box) style one?
For a console program, I suspect you can open the file "lpt1" or maybe "prn" (or maybe "lpt1:" or "prn:") and start sending and maybe receiving characters from it as if it were some type of file stream. For example, I vaguely recall being able to do something like this in the past from a command prompt:
echo "this will be printed" %26gt; lpt1
But if you are writing a Windows program, you probably need some kind of Windows API function calls. A little research on that turned up this page:
http://msdn.microsoft.com/library/defaul...
Hope this helps.
Can I find C programs for Mechanical Engineering problems on the net? Any urls?
I am interested in seeing some C programs for Mechanical Engineering problems with the code. Can any show me the same? I would need the code too.
Can I find C programs for Mechanical Engineering problems on the net? Any urls?
Run a search on those keywords in Yahoo or Google and, if they exist, you'll find them.
Reply:Technet.com,physics codes (c)
savage garden
Can I find C programs for Mechanical Engineering problems on the net? Any urls?
Run a search on those keywords in Yahoo or Google and, if they exist, you'll find them.
Reply:Technet.com,physics codes (c)
savage garden
Programming in C? Anyone?
I need to learn C programming by myself. where can i do that in the net? or maybe there is someone out there who is an expert who can help me. Just respond and we can talk through email. i will send you an email. I need to learn or else i will fail in my course. thanks.
Programming in C? Anyone?
The best bet is to get a decent book with tutorials and work through it. I'd also use the newsgroups - they tend to have better technical discourse than forums such as these.
I like to search using groups.google.com
Reply:http://freecomputerbooks.com/
Programming in C? Anyone?
The best bet is to get a decent book with tutorials and work through it. I'd also use the newsgroups - they tend to have better technical discourse than forums such as these.
I like to search using groups.google.com
Reply:http://freecomputerbooks.com/
C programming to control 2 dos windows?
Is it possible that a C program make a dos window to talk to another dos window?
C programming to control 2 dos windows?
AFAIK, you'll need two separate processes. You can get them communicating using your favourite IPC method.
Reply:yeah ,possible .
by socket programming.
Reply:Google "Multi-Threading in C"
Reply:multi threading
C programming to control 2 dos windows?
AFAIK, you'll need two separate processes. You can get them communicating using your favourite IPC method.
Reply:yeah ,possible .
by socket programming.
Reply:Google "Multi-Threading in C"
Reply:multi threading
Linux c++ programming?
I have fedora 8 and i was wondering what compiler and programming environment should i use if i want to program with C++. Thank you. i love linux by the way
Linux c++ programming?
install G++ that is GCC's C++ compiler
Reply:I love Linux and computers but I just changed my major from computer science 'cuz I couldn't take the super long hours of inactivity. I personally like Emacs and there was another i used called Kate which was friggin' awesome but i didn't use it long enough to figure out all the tricks it had to offer.
Reply:g++, the GNU c++ compiler, is most likely already installed.
There are many IDEs/editors available. I use vi and gdb. KDevelop is a KDE IDE which is similar to microsoft visual studio. you can also use eclipse.
Reply:gcc is the standard complier used for just about everything.
You can code in any text editor you like. Try them all, see what you like.
Reply:Use the GNU C++ compiler. It can be used by the command g++.
I suggest
$ g++ -g -o outputfile.exe inputfile.cpp
If your looking for a good c++ IDE I would suggest eclipse or VGUI. Both are good developer Environments.
Linux c++ programming?
install G++ that is GCC's C++ compiler
Reply:I love Linux and computers but I just changed my major from computer science 'cuz I couldn't take the super long hours of inactivity. I personally like Emacs and there was another i used called Kate which was friggin' awesome but i didn't use it long enough to figure out all the tricks it had to offer.
Reply:g++, the GNU c++ compiler, is most likely already installed.
There are many IDEs/editors available. I use vi and gdb. KDevelop is a KDE IDE which is similar to microsoft visual studio. you can also use eclipse.
Reply:gcc is the standard complier used for just about everything.
You can code in any text editor you like. Try them all, see what you like.
Reply:Use the GNU C++ compiler. It can be used by the command g++.
I suggest
$ g++ -g -o outputfile.exe inputfile.cpp
If your looking for a good c++ IDE I would suggest eclipse or VGUI. Both are good developer Environments.
C++ programming?
I am a complete beginner to programming, but have to learn C++ next year at uni so thought I would give myself a bit of a headstart. The book that the course is based on is "C++ How To Program" by Deitel %26amp; Deitel. Is this a good book for me to start to learn with, someone said somewhere that it contains lots of OOP (whatever that is, and apparently its hard to learn). Could someone enlighten me please.
If you don't think this is a good book, could you please recommend one for me (remember, I am a complete beginner, the only programming I have done is a pit of BASIC for picaxe ICs).
Thanks for your help.
C++ programming?
Almost everyone learns with Deitel; it's very common in entry-level classes.
I don't think it's a very good book, however; it's not what I would call "Plain language."
For all begginers, I recommend the For Dummies series. They have a C++ book with a CD-ROM that includes sample code; you might want to try that if you want a head start. Very plain-language and easy to follow.
Reply:I can't remember who its by but its called "C++: An Introduction to Computing". Very good book.
Reply:I actually used the same book in my C++ class a year ago. I had no problem following the book, but then again, while C++ was rather new to me, I have been a programmer in other languages for over 10 years. Overall, I thought the book was fine. If you need to get the book anyways because of the class, pick it up and start playing with it. There will more than likely be areas where you will need further explaination like polymorphism, operator overloading, etc. Some aspects take a little getting used to.
And OOP means Object Oriented Programming. VB.NET, C#.NET, and Java are all examples of OOP. Programming is based more on the use of objects (and their associated properties, methods, events) than your legacy procedural languages (like COBOL, C, etc).
Reply:OOP stands for object oriented programming. C++ was created by taking C (not an OOP language) and adding object oriented constructs to the language. As its roots are not object-oriented it has a lot of baggage and idiosyncrasies that can make it difficult for beginners.
It has been many years since I learned C and C++ and I am unfamiliar with the book that you mention. I will recommend a companion book that will help you out tremendously with the "gotcha's" in the language -- Scott Meyer's "Effective C++". Also, Bruce Eckel's "Thinking in C++" is good and is available for free access online.
Best wishes for a successful time at the university!
Reply:never used that book before (I'm a VB-6 programmer), but there's a great site full of source code: Planet Source Code...http://www.pscode.com
Reply:I would reccommend "Sams Teach Yourself C++ in 24 Hours" for a good start. I used it, and it lays down a great foundation. It will teach you all the basics, from your very first program to advanced concepts like object-orientation and polymorphism.
I also use "C/C++ Programmer's Reference". It's great if you forget the syntax and need a quick refresher.
Reply:What really helped me understand OOP was a section from Windows 95 Programming for Dummies, which apparently is included in C++ for Dummies.
It's the description of "object oriented nachos", and it's one of those things that I read and didn't get. Then, as I lied in bed starting at the ceiling, it hit me.
There's a lot more to OOP than what's in this sample chapter, of course. But those things become a lot easier when you have a solid grasp of the basic concept.
Reply:I would reccommend the website
http://www.cplusplus.com/doc/tutorial/in...
This website has a very nice tutorial and is useful for people without any or with little programming knowledge.
potential break up song
If you don't think this is a good book, could you please recommend one for me (remember, I am a complete beginner, the only programming I have done is a pit of BASIC for picaxe ICs).
Thanks for your help.
C++ programming?
Almost everyone learns with Deitel; it's very common in entry-level classes.
I don't think it's a very good book, however; it's not what I would call "Plain language."
For all begginers, I recommend the For Dummies series. They have a C++ book with a CD-ROM that includes sample code; you might want to try that if you want a head start. Very plain-language and easy to follow.
Reply:I can't remember who its by but its called "C++: An Introduction to Computing". Very good book.
Reply:I actually used the same book in my C++ class a year ago. I had no problem following the book, but then again, while C++ was rather new to me, I have been a programmer in other languages for over 10 years. Overall, I thought the book was fine. If you need to get the book anyways because of the class, pick it up and start playing with it. There will more than likely be areas where you will need further explaination like polymorphism, operator overloading, etc. Some aspects take a little getting used to.
And OOP means Object Oriented Programming. VB.NET, C#.NET, and Java are all examples of OOP. Programming is based more on the use of objects (and their associated properties, methods, events) than your legacy procedural languages (like COBOL, C, etc).
Reply:OOP stands for object oriented programming. C++ was created by taking C (not an OOP language) and adding object oriented constructs to the language. As its roots are not object-oriented it has a lot of baggage and idiosyncrasies that can make it difficult for beginners.
It has been many years since I learned C and C++ and I am unfamiliar with the book that you mention. I will recommend a companion book that will help you out tremendously with the "gotcha's" in the language -- Scott Meyer's "Effective C++". Also, Bruce Eckel's "Thinking in C++" is good and is available for free access online.
Best wishes for a successful time at the university!
Reply:never used that book before (I'm a VB-6 programmer), but there's a great site full of source code: Planet Source Code...http://www.pscode.com
Reply:I would reccommend "Sams Teach Yourself C++ in 24 Hours" for a good start. I used it, and it lays down a great foundation. It will teach you all the basics, from your very first program to advanced concepts like object-orientation and polymorphism.
I also use "C/C++ Programmer's Reference". It's great if you forget the syntax and need a quick refresher.
Reply:What really helped me understand OOP was a section from Windows 95 Programming for Dummies, which apparently is included in C++ for Dummies.
It's the description of "object oriented nachos", and it's one of those things that I read and didn't get. Then, as I lied in bed starting at the ceiling, it hit me.
There's a lot more to OOP than what's in this sample chapter, of course. But those things become a lot easier when you have a solid grasp of the basic concept.
Reply:I would reccommend the website
http://www.cplusplus.com/doc/tutorial/in...
This website has a very nice tutorial and is useful for people without any or with little programming knowledge.
potential break up song
Programming using C++?
how do i write a program for this:
a program that reads in the coordinates of three points on a two-dimensional surface (a plane). Each point has an x-coordinate and a y- coordinate. Each point is given on a line by itself.
Thus your program's input will be something like:
------------------------------------
5.0 5.0
6.0 6.0
7.0 7.0
------------------------------------
The program computes the total distance involved in traveling from the first point (in this case 5.0,5.0) to the second point (6.0,6.0)
to the third point (7.0,7.0 in this case). It displays this distance on a single line:
------------------------------------
2.82843
------------------------------------
I need this asap (C++ programming file.. like one that produces the letter G,
#include %26lt;iostream%26gt;
using namespace std;
int main() {
cout %26lt;%26lt; "G";
return 0;
}
thanks in advance)
Programming using C++?
Okay, so currently the sum total of your programming abilities is to print a single letter to standard output. Frankly, the market for this skill is pretty thin.
I'd suggest doing this assignment yourself, and working on your problem solving skills. I'll give you one tip, though. The distance between two points in the plane is computed as
sqrt( (x0 - x1)^2 + (y0 - y1)^2 )
You'll have to turn that into valid C++, but once you get that working, the rest of the program should be very easy.
If you can't solve it, you may want to reconsider your choice of careers.
Reply:How much will you pay me for this?
a program that reads in the coordinates of three points on a two-dimensional surface (a plane). Each point has an x-coordinate and a y- coordinate. Each point is given on a line by itself.
Thus your program's input will be something like:
------------------------------------
5.0 5.0
6.0 6.0
7.0 7.0
------------------------------------
The program computes the total distance involved in traveling from the first point (in this case 5.0,5.0) to the second point (6.0,6.0)
to the third point (7.0,7.0 in this case). It displays this distance on a single line:
------------------------------------
2.82843
------------------------------------
I need this asap (C++ programming file.. like one that produces the letter G,
#include %26lt;iostream%26gt;
using namespace std;
int main() {
cout %26lt;%26lt; "G";
return 0;
}
thanks in advance)
Programming using C++?
Okay, so currently the sum total of your programming abilities is to print a single letter to standard output. Frankly, the market for this skill is pretty thin.
I'd suggest doing this assignment yourself, and working on your problem solving skills. I'll give you one tip, though. The distance between two points in the plane is computed as
sqrt( (x0 - x1)^2 + (y0 - y1)^2 )
You'll have to turn that into valid C++, but once you get that working, the rest of the program should be very easy.
If you can't solve it, you may want to reconsider your choice of careers.
Reply:How much will you pay me for this?
Can print in c programming without semicolumn?
can print hello in c programming without a semicoloun
Can print in c programming without semicolumn?
All statements in c should be end with semi-column,
and Conditional statements like "if" "else" they are not having semi-column
Reply:All statements in c should be end with semicolumn.
Reply:it is impossible
Can print in c programming without semicolumn?
All statements in c should be end with semi-column,
and Conditional statements like "if" "else" they are not having semi-column
Reply:All statements in c should be end with semicolumn.
Reply:it is impossible
Give me an explanation on hoe to use fuctions in c programming
in c programming?
have u used main
main is a function
Give me an explanation on hoe to use fuctions in c programming
in c programming?
C and C++ functions are identical and so here is a link that should help....i'd explain them but i figure this would be easier for you: http://www.devarticles.com/c/a/Cplusplus...
main is a function
Give me an explanation on hoe to use fuctions in c programming
in c programming?
C and C++ functions are identical and so here is a link that should help....i'd explain them but i figure this would be easier for you: http://www.devarticles.com/c/a/Cplusplus...
Strings and arrays in c programming?
i am using the borland compiler and using c programming not c++ i was wondering how to create a four element array of strings to hold the suit's of a deck(hearts,spades, clubs, and diamonds). Thank you
Strings and arrays in c programming?
Ever use pointers?
const char *suits[4] = {"hearts","spades","clubs","diamonds"};
Reply:char *suits[]={{"hearts"},{"spades"},{"clubs"...
//to get hearts string use *suits, to get spades string use *(suits+1)
Reply:use pointers or use two dimensional array of char type
char ch[4][9]={"hearts","clubs","spades","dia...
here 9 is the maximum of length of string in the array ie.."Diamonds"
ovary
Strings and arrays in c programming?
Ever use pointers?
const char *suits[4] = {"hearts","spades","clubs","diamonds"};
Reply:char *suits[]={{"hearts"},{"spades"},{"clubs"...
//to get hearts string use *suits, to get spades string use *(suits+1)
Reply:use pointers or use two dimensional array of char type
char ch[4][9]={"hearts","clubs","spades","dia...
here 9 is the maximum of length of string in the array ie.."Diamonds"
ovary
C and Java programming using Microsoft Visual Studio Proffesional.?
Hi. I just bought Microsoft Visula Studio Proffessional and I am a C and a Java programmer. Can anyone tell me to comiler C or Java programs using Microsoft Visual Studio Proffesional?
C and Java programming using Microsoft Visual Studio Proffesional.?
You can't use MS Visual Studio for Java. For that, you need Sun Microsystem's Java Developer's Kit:
http://java.sun.com/javase/downloads/ind...
A good free C and C++ compiler is Dev C++, found here:
http://www.bloodshed.net/index.html
C and Java programming using Microsoft Visual Studio Proffesional.?
You can't use MS Visual Studio for Java. For that, you need Sun Microsystem's Java Developer's Kit:
http://java.sun.com/javase/downloads/ind...
A good free C and C++ compiler is Dev C++, found here:
http://www.bloodshed.net/index.html
I am too good in programming in C and C++. Where can i find the job?
Programming in c and c++ is my passion. I just want to do job in either or two. and i have to stay in jaipur for my family reasons. What to do ?????
I am too good in programming in C and C++. Where can i find the job?
Post your resume to sites like naukri.com,Timesjob.com,Clickjobs.com,yu... etc.If u r fresher visit the site http://fresherjobsinfo.blogspot.com .Also visit the site allinterview.com to get more info. Best Of Luck.
Reply:Sorry bub -- there is no "I" in Team development...
I am too good in programming in C and C++. Where can i find the job?
Post your resume to sites like naukri.com,Timesjob.com,Clickjobs.com,yu... etc.If u r fresher visit the site http://fresherjobsinfo.blogspot.com .Also visit the site allinterview.com to get more info. Best Of Luck.
Reply:Sorry bub -- there is no "I" in Team development...
Help with C++ programming...?
I'm taking an independent study course on C++ programming through my college. So far I've created a mean and standard deviation program, a linear regression program, and a few other much simpler programs. I am now working on a program to add up to 12 vectors together, and am having a lot of trouble with it. If anyone could help me find an example C++ vector addition program to use as a template, it would be greatly appretiated. Thanks a lot.
Help with C++ programming...?
Here are some things I used when I was in that class..
http://www.ann.jussieu.fr/free.htm
Help with C++ programming...?
Here are some things I used when I was in that class..
http://www.ann.jussieu.fr/free.htm
How do you generate the following output using C programming language??Please help me!!!!?
This is the output that is to be generated:
5
4 5
3 4 5
2 3 4 5
1 2 3 4 5
How do you generate the following output using C programming language??Please help me!!!!?
This looks like a class assignment so you should try to do it yourself. There are many ways to do this. The dirty way is to print out each line exactly like you have it. I expect your teacher wants a general algorithm. Here is some tips.
to print out something
printf ("%d\n", myNumber);
The \n is to go to next line if you don't need this don't put it in.
Have two loops. The outer loop goes from 5 to 1.
The inner loop goes from X to 5. I let you figure out what X should be.
memory cards
5
4 5
3 4 5
2 3 4 5
1 2 3 4 5
How do you generate the following output using C programming language??Please help me!!!!?
This looks like a class assignment so you should try to do it yourself. There are many ways to do this. The dirty way is to print out each line exactly like you have it. I expect your teacher wants a general algorithm. Here is some tips.
to print out something
printf ("%d\n", myNumber);
The \n is to go to next line if you don't need this don't put it in.
Have two loops. The outer loop goes from 5 to 1.
The inner loop goes from X to 5. I let you figure out what X should be.
memory cards
C programming problem?
write a program that takes a line at a time and reverses the words of the lines.
ex. input: i am confused
output: confused am i
the data should contain one blank between each word.
any idea on how to solve this problem?
please give some ideas... how to solve this in c programming language...?
C programming problem?
ur program is bit difficult and is not so easy as it seems. what u got as first answer is incorrect since it will print only reverse charcater of ur answer. i.e. this is me gives em si siht which is not what u wanted. i have tried to write a program but the program has some bug and it is not giving what i wanted. i have done the following
1. count the no of blank spaces in string. this will give u the number of words in sentece say no_blank.
2. then create a array that stores the location of blank spaces in the sentence int array[].
3. using that array u then copy the word between two blank spaces from back.
// !! RAM !!
#include"stdio.h"
#include"string.h"
char* returnreverse( char a[] )
{
int no=1;
for( int i=0;i%26lt;strlen(a);i++)
{
if( a[i] == ' ')
no++;
}
char *words = new char [no];
int r=0;
for( int j=0;j%26lt;strlen(a);j++)
{
if( a[j] == ' ' )
{
words[r] = j;
r++;
}
}
words[r]= strlen(a-1);
char *rev= new char[strlen(
a)];
int m=0;
for( int h=r;h%26gt;= 0;h--)
{
// copy the words from a[words[h-1] ] to a[words[h-1]] in rev
for(int s= words[h-1];s%26lt;words[h];s++)
{
rev[m] = a[s];
m++;
}
rev[m]=' ';
m++;
}
return rev;
}
main()
{
char s[100];
printf("\n\n\tEnter a string : ");
gets(s);
printf("ur reverse string is");
printf( returnreverse(s) );
printf("\n");
return 0;
}
.
Reply:#include %26lt;string.h%26gt;
#include %26lt;stdio.h%26gt;
#include %26lt;stdlib.h%26gt;
int main() {
char s[1000];
int i;
int len=0;
while (1) {
printf("\n\n\tEnter a string : ");
gets(s);
printf("\n");
for(i=0;s[i];i++) {
printf("%c",s[i]);
}
len=strlen(s);
printf("\n\n");
for(i=len-1; s[i], i%26gt;=0; i--)
printf("%c",s[i]);
}
return 0;
}
Reply:first you should save every particular character of that string in another array meaning you have to declare a new array and put the first character in the last index and so on.... you should use some string methods to be able to get the length of the string. I remembered that It might be "string.length" or something like that.
ex. input: i am confused
output: confused am i
the data should contain one blank between each word.
any idea on how to solve this problem?
please give some ideas... how to solve this in c programming language...?
C programming problem?
ur program is bit difficult and is not so easy as it seems. what u got as first answer is incorrect since it will print only reverse charcater of ur answer. i.e. this is me gives em si siht which is not what u wanted. i have tried to write a program but the program has some bug and it is not giving what i wanted. i have done the following
1. count the no of blank spaces in string. this will give u the number of words in sentece say no_blank.
2. then create a array that stores the location of blank spaces in the sentence int array[].
3. using that array u then copy the word between two blank spaces from back.
// !! RAM !!
#include"stdio.h"
#include"string.h"
char* returnreverse( char a[] )
{
int no=1;
for( int i=0;i%26lt;strlen(a);i++)
{
if( a[i] == ' ')
no++;
}
char *words = new char [no];
int r=0;
for( int j=0;j%26lt;strlen(a);j++)
{
if( a[j] == ' ' )
{
words[r] = j;
r++;
}
}
words[r]= strlen(a-1);
char *rev= new char[strlen(
a)];
int m=0;
for( int h=r;h%26gt;= 0;h--)
{
// copy the words from a[words[h-1] ] to a[words[h-1]] in rev
for(int s= words[h-1];s%26lt;words[h];s++)
{
rev[m] = a[s];
m++;
}
rev[m]=' ';
m++;
}
return rev;
}
main()
{
char s[100];
printf("\n\n\tEnter a string : ");
gets(s);
printf("ur reverse string is");
printf( returnreverse(s) );
printf("\n");
return 0;
}
.
Reply:#include %26lt;string.h%26gt;
#include %26lt;stdio.h%26gt;
#include %26lt;stdlib.h%26gt;
int main() {
char s[1000];
int i;
int len=0;
while (1) {
printf("\n\n\tEnter a string : ");
gets(s);
printf("\n");
for(i=0;s[i];i++) {
printf("%c",s[i]);
}
len=strlen(s);
printf("\n\n");
for(i=len-1; s[i], i%26gt;=0; i--)
printf("%c",s[i]);
}
return 0;
}
Reply:first you should save every particular character of that string in another array meaning you have to declare a new array and put the first character in the last index and so on.... you should use some string methods to be able to get the length of the string. I remembered that It might be "string.length" or something like that.
C or C++ for Unix programming?
I know C++ and I just started using Linux (SUSE 10.1 distro) I would like to see what I can do with C++ and Linux, but all the tutorials I look at always seem to say "learn C programming for Unix" or something of that nature. Is it not wise to use C++ when programming in Linux? I want to make programs that interact with the operating system itself, kinda of like windows and there "window services". Any suggestions?
Also if you could supply any good tutorials that deal with progrogramming in Unix that be greatly appreciated.
C or C++ for Unix programming?
C++ is just a superset of C. Use C++ for object orientated programming. If you don't need object oriented programming, for example for small projects, then use C. There's nothing wrong with C++ on Linux / Unix. It is pointless to use C++ if you aren't going to use objects (but in that case the compiled code would be equivalent to C anyway).
Reply:http://www.mindview.net/Books/TICPP/Thin...
Try this book it's c++ and the example code is available for Linux Red-hat installs the examples by default.
Reply:I found this tutorial on what you asked at this link :
http://users.actom.co.il/~choo/lupg/tuto...
Reply:just to chime in, I have a linux programming book, and all of it is in C not c++.
Not sure why that is. I know you can write and compile with gcc in C++, but they may be some reason that C is being used for the low level stuff.
Look at www.linuxforums.org
Also if you could supply any good tutorials that deal with progrogramming in Unix that be greatly appreciated.
C or C++ for Unix programming?
C++ is just a superset of C. Use C++ for object orientated programming. If you don't need object oriented programming, for example for small projects, then use C. There's nothing wrong with C++ on Linux / Unix. It is pointless to use C++ if you aren't going to use objects (but in that case the compiled code would be equivalent to C anyway).
Reply:http://www.mindview.net/Books/TICPP/Thin...
Try this book it's c++ and the example code is available for Linux Red-hat installs the examples by default.
Reply:I found this tutorial on what you asked at this link :
http://users.actom.co.il/~choo/lupg/tuto...
Reply:just to chime in, I have a linux programming book, and all of it is in C not c++.
Not sure why that is. I know you can write and compile with gcc in C++, but they may be some reason that C is being used for the low level stuff.
Look at www.linuxforums.org
Do u know, in c++ programming, how I can infile a string which has exactly n characters in it? I appreciate it
If you use fopen for the stream you could do an fread to read a specific number of bytes from the stream.
C-programming...beginners or professionals ... plz help me out?
i need a program written in C on finding roots of a quadratic equations and finding the average of n even numbers. I need the programming. Or plz refer any website from where i can download the same. got assignment tommorow.
C-programming...beginners or professionals ... plz help me out?
Erm... why did you put this is in the video games category?
Whatever... you're best off searching Google and SourceForge - people aren't too keen on writing programs for other people's homework...
Rawlyn.
lotus flower
C-programming...beginners or professionals ... plz help me out?
Erm... why did you put this is in the video games category?
Whatever... you're best off searching Google and SourceForge - people aren't too keen on writing programs for other people's homework...
Rawlyn.
lotus flower
C-programming...beginners or professionals... plz help me out?
i need a program written in C on finding roots of a quadratic equations and finding the average of n even numbers. I need the programming. Or plz refer any website from where i can download the same. got assignment tommorow. i am counting on all of u guyss....plzzzzzzzzz help me out..this is an SOS...distress signal :)
C-programming...beginners or professionals... plz help me out?
int a[10];
int sum = 0;
for (int i = 0; i %26lt; 10; i++)
sum += a[i];
float avg = sum / 10;
C-programming...beginners or professionals... plz help me out?
int a[10];
int sum = 0;
for (int i = 0; i %26lt; 10; i++)
sum += a[i];
float avg = sum / 10;
Which environment is more appropriate for programming in c and c++ 1.Unix 2.Turbo c,c++ 3. Linux and why/?
I just want to know which environment suits programming in c and c++ .
Can u explain the distinguishing characteristics of Unix ,Linux and Turbo(c, c++) programming environments .
Which environment best suits for programming competitions.
I would be very thankful to u if u answer my question .
my id is "aravindreddy_ism@yahoo.com"
Which environment is more appropriate for programming in c and c++ 1.Unix 2.Turbo c,c++ 3. Linux and why/?
Unix is OS , programming inUnix without any editor is difficult for beginners.
Turbo C editor which provided good visual interface where you can create source file , compile it and execute it with just the hit of different key combinations , i will suggest for any one who is working on Windows platform.
At broader view,Linux is a Unix like OS but not Unix .
Linux is opensource while Unix Propritory.
Can u explain the distinguishing characteristics of Unix ,Linux and Turbo(c, c++) programming environments .
Which environment best suits for programming competitions.
I would be very thankful to u if u answer my question .
my id is "aravindreddy_ism@yahoo.com"
Which environment is more appropriate for programming in c and c++ 1.Unix 2.Turbo c,c++ 3. Linux and why/?
Unix is OS , programming inUnix without any editor is difficult for beginners.
Turbo C editor which provided good visual interface where you can create source file , compile it and execute it with just the hit of different key combinations , i will suggest for any one who is working on Windows platform.
At broader view,Linux is a Unix like OS but not Unix .
Linux is opensource while Unix Propritory.
Anyone ever taken a .Net programming - C# test from ProveIt.com?
I am going to take the test this week-end...hoping to do well and I cannot find anywhere that has information on what the test is like and what to expect...or some samples of tests taken.
Thank you for any help!
Anyone ever taken a .Net programming - C# test from ProveIt.com?
Check out Geek Interview ...
Reply:Yea Paint.NET
Thank you for any help!
Anyone ever taken a .Net programming - C# test from ProveIt.com?
Check out Geek Interview ...
Reply:Yea Paint.NET
Bypass GameGuard with C++ programming language?
I'm learning C++ programming and i already know those simple looping and those ask user to key in value.
What should i continue to learn?
What program i need to write to do to bypass GameGuard?
Bypass GameGuard with C++ programming language?
just go here link below
http://www.codeproject.com/
silk flowers
What should i continue to learn?
What program i need to write to do to bypass GameGuard?
Bypass GameGuard with C++ programming language?
just go here link below
http://www.codeproject.com/
silk flowers
Question in C Programming?
Using C/C++ programming, I have to enter in 5 numbers, and the program should find out the largest entered number, check if its negative, if so, the program should ignore it and add up the rest, I want to display the total sum of all numbers entered. I have to do this using only loops. Please help me out, thanks
Question in C Programming?
I was about to solve it for you, but yes what rod says is correct, so i am not doing it, :), try hard a little, and post your code here, you will do great and since you are learning we can help you if its needed.
----------
Hi buddy, How is your solution going?, let us know...
---------
How did your solution go!, lol...let us know.
Reply:This is not hard, but if we just do it for you, you won't learn very well.
It involves loops, so can you write a program to input 5 numbers and put them into integers? If you haven't had arrays, yet, you could just declare the numbers as:
int n1, n2, n3, n4, n5;
Make a good stab at it, and post again, then people can help you get over any problems.
Question in C Programming?
I was about to solve it for you, but yes what rod says is correct, so i am not doing it, :), try hard a little, and post your code here, you will do great and since you are learning we can help you if its needed.
----------
Hi buddy, How is your solution going?, let us know...
---------
How did your solution go!, lol...let us know.
Reply:This is not hard, but if we just do it for you, you won't learn very well.
It involves loops, so can you write a program to input 5 numbers and put them into integers? If you haven't had arrays, yet, you could just declare the numbers as:
int n1, n2, n3, n4, n5;
Make a good stab at it, and post again, then people can help you get over any problems.
Do you think C is the programming language that will be used one more century?
I can't predict going out one century but I believe the C language will be around for a while. Not everything requires fully object oriented languages like C++, Java, or C#.
Do you think C is the programming language that will be used one more century?
sure, it's a great language and it produces very fast executables. why should it become extinct?
my guess is that C++ is extinct when C is still heavily used.
Reply:c has now become a very old language. but, it provides a base for other programming languages like c++, c# and java. it is difficult to learn these languages without learning c. besides, major parts of popular operating systems like windows, unix, linux are still written in c. so, c will continue to live.
Reply:Nope. When the oil runs out C will die along with all other programming languages. But until then, it will go strong!
Do you think C is the programming language that will be used one more century?
sure, it's a great language and it produces very fast executables. why should it become extinct?
my guess is that C++ is extinct when C is still heavily used.
Reply:c has now become a very old language. but, it provides a base for other programming languages like c++, c# and java. it is difficult to learn these languages without learning c. besides, major parts of popular operating systems like windows, unix, linux are still written in c. so, c will continue to live.
Reply:Nope. When the oil runs out C will die along with all other programming languages. But until then, it will go strong!
What is the best book for C++ Macro and Script Programming ?
What is the best book for C++ Macro and Script Programming ?
for example:
i want write a program that add a tool in autocad that calculate distance from 2 line. (( this is just a example, please guide me ))
is there any book to teach me this style of programming ?
thanks
What is the best book for C++ Macro and Script Programming ?
For AutoCAD specifically, the language of choice is LISP...
Reply:Personally I don't study it but try: C++ for Dummies.
for example:
i want write a program that add a tool in autocad that calculate distance from 2 line. (( this is just a example, please guide me ))
is there any book to teach me this style of programming ?
thanks
What is the best book for C++ Macro and Script Programming ?
For AutoCAD specifically, the language of choice is LISP...
Reply:Personally I don't study it but try: C++ for Dummies.
How do I program C using a DOS promt?
I have no expirience whatsoever in C/C++, and i would like to try my hand at programming. Can someone tell me how I can start? I would like to do it using a DOS prompt, as that way i wont have to download anything
How do I program C using a DOS promt?
You still need to download a compiler, even if you want to use the command line. Unlike Linux, which ships with gcc, there is no compiler included in Windows. Since you have to download something anyway, I recommend DevC++ or Visual Studio Express for C++, then you'll have the option of using the nice IDE or the command line.
Reply:DevC++ can be found at http://www.bloodshed.net/devcp...
Visual Studio Express at http://msdn2.microsoft.com/en-... (the beta for 2008 is up, but I would recommend using 2005 for now) Report It
purple flowers
How do I program C using a DOS promt?
You still need to download a compiler, even if you want to use the command line. Unlike Linux, which ships with gcc, there is no compiler included in Windows. Since you have to download something anyway, I recommend DevC++ or Visual Studio Express for C++, then you'll have the option of using the nice IDE or the command line.
Reply:DevC++ can be found at http://www.bloodshed.net/devcp...
Visual Studio Express at http://msdn2.microsoft.com/en-... (the beta for 2008 is up, but I would recommend using 2005 for now) Report It
purple flowers
Does anyone know where I could get a copy of some C++ programming standards?
I've tried searching on the internet but haven't had much luck so far. I need a document that can be used by developers as a gudeline for naming conventions, styles, best practices etc. Grateful for any pointers. Thanks
Does anyone know where I could get a copy of some C++ programming standards?
I recommend the book "C++ Coding Standards: 101 Rules, Guidelines, and Best Practices," by Herb Sutter and Andrei Alexandrescu. They have identified some really helpful coding practices that ought to be followed (and some really dangerous practices that must be avoided). Equally important, they have refrained from laying down rules about picayune things that don't really matter, or matters of taste that can legitimately go either way. (The book begins with a discussion of what needs to be standardized and what doesn't.) There's really good stuff there, and many development teams nowadays are simply adopting that book as their coding standard. ISBN 0-321-11358-6
Reply:try http://www.codeproject.com
Reply:http://www.possibility.com/Cpp/CppCoding...
Does anyone know where I could get a copy of some C++ programming standards?
I recommend the book "C++ Coding Standards: 101 Rules, Guidelines, and Best Practices," by Herb Sutter and Andrei Alexandrescu. They have identified some really helpful coding practices that ought to be followed (and some really dangerous practices that must be avoided). Equally important, they have refrained from laying down rules about picayune things that don't really matter, or matters of taste that can legitimately go either way. (The book begins with a discussion of what needs to be standardized and what doesn't.) There's really good stuff there, and many development teams nowadays are simply adopting that book as their coding standard. ISBN 0-321-11358-6
Reply:try http://www.codeproject.com
Reply:http://www.possibility.com/Cpp/CppCoding...
C++ programming question?
I am taking a class in C++ first time with this language and after reading the chapters several times I am still no closer to answering this question please help.
What factors, conditions, and circumstances are crucial in using C++ as a programming language? How do these differ from using basic C? Any help in pointing me in the right direction would be greatly appreciated.
C++ programming question?
C++ is object oriented, C isn't. So you can list all factors relating to this.
Reply:well, c++ has a object oriented approach, which c doesn't. look to object oriented programming in google, and u will know!
Reply:C++ is the incremented version of C. It has all that C has, with Object Orientation.
To learn C++ i'd suggest you learn the concepts of Objects and classes. This will really help you to get the fundamentals of Object Oriented Programming.
It is crucial to learn Classes.
C++ is widely used in game programming where there can be lots of objects.
I hope i helped. Good luck on learning C++.
What factors, conditions, and circumstances are crucial in using C++ as a programming language? How do these differ from using basic C? Any help in pointing me in the right direction would be greatly appreciated.
C++ programming question?
C++ is object oriented, C isn't. So you can list all factors relating to this.
Reply:well, c++ has a object oriented approach, which c doesn't. look to object oriented programming in google, and u will know!
Reply:C++ is the incremented version of C. It has all that C has, with Object Orientation.
To learn C++ i'd suggest you learn the concepts of Objects and classes. This will really help you to get the fundamentals of Object Oriented Programming.
It is crucial to learn Classes.
C++ is widely used in game programming where there can be lots of objects.
I hope i helped. Good luck on learning C++.
Calculating in C++ programming?
I'm trying to write a program in C++ programming and am having trouble with getting it to calculate via a formula. Can someone explain to me how to code the program to calculate the formula using values put into the program? I'd appreciate any help, programming isn't my strong suite. lol! Thanks!
Calculating in C++ programming?
it depends on the formula, but basically u have to decalre it then cin it
Reply:The whole world is going JAVA. Just ignore the stupid C++ language which does not make any sense. Why to have pointer is still I can't understand. Go for Java.
Calculating in C++ programming?
it depends on the formula, but basically u have to decalre it then cin it
Reply:The whole world is going JAVA. Just ignore the stupid C++ language which does not make any sense. Why to have pointer is still I can't understand. Go for Java.
Where can i get a c program for UDP.. without socket programming.??
i need to get a C program code a embedded application for UDP data transfer. PLz help
Where can i get a c program for UDP.. without socket programming.??
Try searching in:
http://sourceforge.net/
pistil
Where can i get a c program for UDP.. without socket programming.??
Try searching in:
http://sourceforge.net/
pistil
Can someone help me with C++ programming?
I need the program to have 3 options. Choose how many #'s to enter, and display the largest # input; enter #'s until -99 is input then end program and display smallest # entered; or quit the program. I have a large part of the program written but it's not working properly and I am pretty new to programming. Can someone just help me get the code for the first part straightened out then maybe I can figure it out from there. Here is what I have:
#include %26lt;iostream%26gt;
using namespace std;
const int SENTINEL = -99; //to end option 'B'
int number; //variable to store #s
int counter;
char limit; //variable to store amount of #s to input in 'A'
int main()
{char sel;
number = 0;
int count = 0;
do{
cout %26lt;%26lt; "A) Find the largest # in a list." %26lt;%26lt; endl;
cout %26lt;%26lt; "B) Find the smallest # in a list." %26lt;%26lt; endl;
cout %26lt;%26lt; "C) Quit." %26lt;%26lt; endl;
cout %26lt;%26lt; "What do you want to do?" %26lt;%26lt; endl;
cin %26gt;%26gt; sel;
switch (sel)
{case 'A':
case 'a':
cout %26lt;%26lt; "Enter the amount of numbers to input in series: ";
Can someone help me with C++ programming?
cin %26gt;%26gt; limit;
limit needs to be converted from an ascii letter '3' to an integer.
trick could be limit = limit - '0'
or do it the proper way
Reply:instead of initializing count to 0, initialize it to 1. now count will start at 1. or you could put the count++ before your cout statement.
the other person could be right about limit being in ASCII. set a breakpoint after the cin %26gt;%26gt; limit; line, and see what value you have in limit. if its 0x30 - 0x39 when you enter a 0 - 9 then its ASCII. you could make your while statement read:
while (count %26lt;= (limit %26amp; 0x0f). of course if you enter a larger number than 9, this wont work.
#include %26lt;iostream%26gt;
using namespace std;
const int SENTINEL = -99; //to end option 'B'
int number; //variable to store #s
int counter;
char limit; //variable to store amount of #s to input in 'A'
int main()
{char sel;
number = 0;
int count = 0;
do{
cout %26lt;%26lt; "A) Find the largest # in a list." %26lt;%26lt; endl;
cout %26lt;%26lt; "B) Find the smallest # in a list." %26lt;%26lt; endl;
cout %26lt;%26lt; "C) Quit." %26lt;%26lt; endl;
cout %26lt;%26lt; "What do you want to do?" %26lt;%26lt; endl;
cin %26gt;%26gt; sel;
switch (sel)
{case 'A':
case 'a':
cout %26lt;%26lt; "Enter the amount of numbers to input in series: ";
Can someone help me with C++ programming?
cin %26gt;%26gt; limit;
limit needs to be converted from an ascii letter '3' to an integer.
trick could be limit = limit - '0'
or do it the proper way
Reply:instead of initializing count to 0, initialize it to 1. now count will start at 1. or you could put the count++ before your cout statement.
the other person could be right about limit being in ASCII. set a breakpoint after the cin %26gt;%26gt; limit; line, and see what value you have in limit. if its 0x30 - 0x39 when you enter a 0 - 9 then its ASCII. you could make your while statement read:
while (count %26lt;= (limit %26amp; 0x0f). of course if you enter a larger number than 9, this wont work.
C++ programming on a mac?
I'm taking this programming course at university. We use the computer labs there, they run on Linuix. We're doing c++ programming. I sent some of the documents that I did the c++ on through email to my computer at home so I don't always have to do it in the labs at school.
Anywaaay, my macbook pro won't open it because there's no applications that can support it I suppose. So is there anything I download for it?
C++ programming on a mac?
Install the Xcode tools from your Mac OS X install disk. It supports various languages including C++, C, Objective-C (those are the main ones), Java, Ruby, Python, (X)HTML, CSS, JavaScript, etc. It also has a very nice GUI for GDB which you might find useful. You don't have to use Xcode to edit the C++ files though, you could just use TextEdit, but you get no syntax highlighting. Also, installing Xcode installs gcc and its tools which you'll need to test your code anyway.
Reply:I suggest getting a IBM standard computer.
Reply:im not sure at all...im pretty sure u can find one
Reply:If all you want to do is edit the code files treat them as text files. As for compiling there are linkers available for the MAC but I'm not sure which ones are out there.
Anywaaay, my macbook pro won't open it because there's no applications that can support it I suppose. So is there anything I download for it?
C++ programming on a mac?
Install the Xcode tools from your Mac OS X install disk. It supports various languages including C++, C, Objective-C (those are the main ones), Java, Ruby, Python, (X)HTML, CSS, JavaScript, etc. It also has a very nice GUI for GDB which you might find useful. You don't have to use Xcode to edit the C++ files though, you could just use TextEdit, but you get no syntax highlighting. Also, installing Xcode installs gcc and its tools which you'll need to test your code anyway.
Reply:I suggest getting a IBM standard computer.
Reply:im not sure at all...im pretty sure u can find one
Reply:If all you want to do is edit the code files treat them as text files. As for compiling there are linkers available for the MAC but I'm not sure which ones are out there.
How do i begin Network programming in c++?
For this you need to have C++ compiler on windows or linux.
You can use free microsoft visual C++ compiler or you can own Visual Studio. For linux you can use gcc, there is a version of gcc for windows also.
Read some tutorial about socket programming.
In basic socket works as link between two programs over which you can transfer data.
Suppose you have two bucket and you want to transfer water from one bucket to another.
for this you will use a pipe and connect those two bucket, then water will flow from one two another.
similarly if there are two process those are running on two different pc. and you want to transfer data between them, then you will use sockets.
As for sending letters/emails you need address of remote person similarly for using socket and sending data you need to know the address of remote application that is IP address and port number;
socket works in client-server model, one has to be server and another has to be client.
so using this concept you can start network programming.
example for simple hello world kind of programming you can find in google, and try out.
You can use free microsoft visual C++ compiler or you can own Visual Studio. For linux you can use gcc, there is a version of gcc for windows also.
Read some tutorial about socket programming.
In basic socket works as link between two programs over which you can transfer data.
Suppose you have two bucket and you want to transfer water from one bucket to another.
for this you will use a pipe and connect those two bucket, then water will flow from one two another.
similarly if there are two process those are running on two different pc. and you want to transfer data between them, then you will use sockets.
As for sending letters/emails you need address of remote person similarly for using socket and sending data you need to know the address of remote application that is IP address and port number;
socket works in client-server model, one has to be server and another has to be client.
so using this concept you can start network programming.
example for simple hello world kind of programming you can find in google, and try out.
Help with C++ programming...?
I'm taking an independent study course on C++ programming through my college. So far I've created a mean and standard deviation program, a linear regression program, and a few other much simpler programs. I am now working on a program to add up to 12 vectors together, and am having a lot of trouble with it. If anyone could help me find an example C++ vector addition program to use as a template, it would be greatly appretiated. Thanks a lot.
Help with C++ programming...?
I assume you are using standarrd template classes ?
have a look here :
http://www.mochima.com/tutorials/STL.htm...
( btw I dont recommand atl as part of an introductionary copurse in c++ it is a difficult syutax)
Reply:This is a good reference site:
http://www.cplusplus.com/main.html
You almost certainly want to use a structure or class. The exercise that you're doing is a very standard application that screams for use of those parts of the language.
house plants
Help with C++ programming...?
I assume you are using standarrd template classes ?
have a look here :
http://www.mochima.com/tutorials/STL.htm...
( btw I dont recommand atl as part of an introductionary copurse in c++ it is a difficult syutax)
Reply:This is a good reference site:
http://www.cplusplus.com/main.html
You almost certainly want to use a structure or class. The exercise that you're doing is a very standard application that screams for use of those parts of the language.
house plants
C Programming?
I need a c programming project(some professional examples)
plz help me
C Programming?
asal here is your link
http://www.google.co.uk/search?hl=en%26amp;q=f...
http://www.google.co.uk/search?hl=en%26amp;sa=...
http://www.google.co.uk/search?hl=en%26amp;q=l...
http://www.google.co.uk/search?hl=en%26amp;q=f...
plz help me
C Programming?
asal here is your link
http://www.google.co.uk/search?hl=en%26amp;q=f...
http://www.google.co.uk/search?hl=en%26amp;sa=...
http://www.google.co.uk/search?hl=en%26amp;q=l...
http://www.google.co.uk/search?hl=en%26amp;q=f...
Friday, May 21, 2010
C Programming Homework?
Hello. Can somebody help me with this homework in my computer class? I need to submit this tomorrow... Please help me answer these questions: 1. What is the simplest and largest cause of failure in all computer programs? 2. Differentiate syntax error from logical error. 3. Give the symbols used in C programming and their functions. 4. Differentiate Visual Basic from C Programming.
I hope somebody could help me answer at least one question. Many many thanks. :)
C Programming Homework?
1. It's uninitialized memory or so called dangling pointers. But the most dangerous is buffer overflow.
2. Syntax error is when you messed up syntax of the language like when you forget to add ; at the and of the statement. On the other hand logical is when you mess up your algorithm.For example when you want to process array of items and you forget that array is indexed from 0 to length - 1 and your loop looks like
for(i = 0; i %26lt;= LENGTH; i++) { ... }
3. I'm not quite sure if i understand the question but let's try
* - it can dereference pointer or it's multiplication - it depends on the tokens used.
%26amp; - get the address of the variable.
++ - pretty much inc instruction in the asm. So (i++) == (i = i + 1)
-- - same as ++ but for subtraction.
| - bitwise or
%26amp; - bitwise and
|| - logical or
%26amp;%26amp; - logical and
and many others like %26gt;%26gt; %26lt;%26lt; and so on ...
4. Visual basic is high level language used to create GUI application for MS Windows and C is language used for example to write operating systems , compilers and so on. C is harder to use but is more efficient and you have direct access to the hardware. Many of these statements are oversimplified but imo for some homework it's enough :)
Reply:1. The person has no clue what they are doing.
2. Syntax - No real answer. Thats like entering into a calculator: 3.3456.5.3 * 2.
Reply:1. not meeting requirements
2. syntax errors are compiler driven while logical errors are defects of logic.
4. Visual basic allows you to implement object-oriented methodology (includes object definition etc..)
Reply:1. Bad programming, not knowing whta you are doing.
2. Syntax errors won't compile, logical errors will, but produce results that aren't what you are expecting.
3. Another post will have these.
4. C is older, not visual. Visual Basic isn't as powerful, but is easier and more popular in industry.
I hope somebody could help me answer at least one question. Many many thanks. :)
C Programming Homework?
1. It's uninitialized memory or so called dangling pointers. But the most dangerous is buffer overflow.
2. Syntax error is when you messed up syntax of the language like when you forget to add ; at the and of the statement. On the other hand logical is when you mess up your algorithm.For example when you want to process array of items and you forget that array is indexed from 0 to length - 1 and your loop looks like
for(i = 0; i %26lt;= LENGTH; i++) { ... }
3. I'm not quite sure if i understand the question but let's try
* - it can dereference pointer or it's multiplication - it depends on the tokens used.
%26amp; - get the address of the variable.
++ - pretty much inc instruction in the asm. So (i++) == (i = i + 1)
-- - same as ++ but for subtraction.
| - bitwise or
%26amp; - bitwise and
|| - logical or
%26amp;%26amp; - logical and
and many others like %26gt;%26gt; %26lt;%26lt; and so on ...
4. Visual basic is high level language used to create GUI application for MS Windows and C is language used for example to write operating systems , compilers and so on. C is harder to use but is more efficient and you have direct access to the hardware. Many of these statements are oversimplified but imo for some homework it's enough :)
Reply:1. The person has no clue what they are doing.
2. Syntax - No real answer. Thats like entering into a calculator: 3.3456.5.3 * 2.
Reply:1. not meeting requirements
2. syntax errors are compiler driven while logical errors are defects of logic.
4. Visual basic allows you to implement object-oriented methodology (includes object definition etc..)
Reply:1. Bad programming, not knowing whta you are doing.
2. Syntax errors won't compile, logical errors will, but produce results that aren't what you are expecting.
3. Another post will have these.
4. C is older, not visual. Visual Basic isn't as powerful, but is easier and more popular in industry.
How trendy is C programming?
what is the scope of perfecting C programming and what has to be learnt to make an impact out of it?
How trendy is C programming?
http://www.programmingtutorials.com/c.as...
Reply:C programming is not difficult if you can solve complex problem easy.The c programming according to me is most important and enhanced language. It has wide use it has been use in scientific researchers, different institution and still other different concept has come but it has not ended up. It has also been used to developed different OS.
So you can find that it scope in today's date is endless.
To make impact you should have to know complete knowledge of c and try to solve interaction of C with hardware chapter mostly to have a better grip of computer
Reply:Mostly C/C++ language is the first programming language for so many computer professionals. But very few are become professional in that. We can say C is evergreen laguage. Behind every successful software application there is an impact of C/C++. To become perfect in C/C++ is possible only by smart(not hard) practice. There is no other way. In Programming world C/C++ programmers have very good demand and respect. If you are good in analysis and strong in basic mathematics then you love C/C++ so much.
Thanks alot to Dennis Ritche( C language designer), Bjarne Stroustrup( C++ language designer)
For more info
http://www.hitmill.com/programming/chist...
http://www.hitmill.com/programming/cpp/c...
How trendy is C programming?
http://www.programmingtutorials.com/c.as...
Reply:C programming is not difficult if you can solve complex problem easy.The c programming according to me is most important and enhanced language. It has wide use it has been use in scientific researchers, different institution and still other different concept has come but it has not ended up. It has also been used to developed different OS.
So you can find that it scope in today's date is endless.
To make impact you should have to know complete knowledge of c and try to solve interaction of C with hardware chapter mostly to have a better grip of computer
Reply:Mostly C/C++ language is the first programming language for so many computer professionals. But very few are become professional in that. We can say C is evergreen laguage. Behind every successful software application there is an impact of C/C++. To become perfect in C/C++ is possible only by smart(not hard) practice. There is no other way. In Programming world C/C++ programmers have very good demand and respect. If you are good in analysis and strong in basic mathematics then you love C/C++ so much.
Thanks alot to Dennis Ritche( C language designer), Bjarne Stroustrup( C++ language designer)
For more info
http://www.hitmill.com/programming/chist...
http://www.hitmill.com/programming/cpp/c...
Does any one know of any good tutorials for C programing?
Does any one know of good ways to learn C programming that is free?
Does any one know of any good tutorials for C programing?
You can check programming tutorial websites like http://myitcareer.org/
Reply:You can try downloading (using bit torrent) a C+ for Dummies book. That's what I used.
Reply:http://www.cprogramming.com/tutorial/c/l...
garden centres
Does any one know of any good tutorials for C programing?
You can check programming tutorial websites like http://myitcareer.org/
Reply:You can try downloading (using bit torrent) a C+ for Dummies book. That's what I used.
Reply:http://www.cprogramming.com/tutorial/c/l...
garden centres
Can any one of you give me definition of looping statements in c-programming?
pretty big you see mail here i will send you a free ebook
subject should be "c book"
firozahmed143@rediffmail.com
Can any one of you give me definition of looping statements in c-programming?
a computer program that performs a series of instructions repeatedly until some specified condition is satisfied
you can do looping using
1. for loop
e-g for (i=0; i %26lt; = 100; i ++)
{
blah blah blah
}
2. while loop
e-g: while(i %26lt; 34)
{
do this;
i++;
}
3. do while loop
for more help
http://www.sysprog.net/cloop.html
Reply:Definition: A loop is a way of repeating a statement a number of times until some way of ending the loop occurs. It might be run for a preset number of times, typically in a for loop, repeated as long as an expression is true (a while loop) or repeated until an expression becomes false in a do while loop.
Loops can be created to execute a block of code for a fixed number of times or (e.g. 7 or 17 or 70). Alternatively, loops can be created to repetitively execute a block of code until a condition changes to a wanted state. For instance, the loop may continue until a condition changes from false to true, or from true to false. In this case, the block of code being executed must update the condition being tested in order for the loop to terminate at some point. If the test condition does not change somehow within the loop, the loop will never terminate - the so known 'endless loop'. This is logical error.
* use the while loop
* use the do ...while loop
* use the for loop
The while loop is used to execute a block of code as long as some condition is true. If the condition is false from the start the block of code is not executed at al. The while loop tests the condition before it's executed so sometimes the loop may never be executed if initially the condition is not met. Its syntax is as follows.
while (tested condition is satisfied)
{
block of code
}
In all constructs, curly braces should only be used if the construct is to execute more than one line of code. The above program executes only one line of code so it not really necessary (same rules apply to if...else constructs) but you can use it to make the program seem more understandable or readable.
Here is a simple example of the use of the while loop. This program counts from 1 to 100.
#include %26lt;stdio.h%26gt;
int main(void)
{
int count = 1;
while (count %26lt;= 100)
{
printf("%d\n",count);
count += 1; // Notice this statement
}
return 0;
}
Note that no semi-colons ( ; ) are to be used after the while (condition) statement. These loops are very useful because the condition is tested before execution begins. However i never seem to like these loops as they are not as clear to read as the do ...while loops. The while loop is the favorite amongst most programmers but as for me, i definitely prefer the do ...while loop.
do ....while
The do loop also executes a block of code as long as a condition is satisfied. The difference between a "do ...while" loop and a "while {} " loop is that the while loop tests its condition before execution of the contents of the loop begins; the "do" loop tests its condition after it's been executed at least once. As noted above, if the test condition is false as the while loop is entered the block of code is never executed. Since the condition is tested at the bottom of a do loop, its block of code is always executed at least once.
Some people don't like these loops because it is always executed at least once. When i ask them "so what?", they normally reply that the loop executes even if the data is incorrect. Basically because the loop is always executed, it will execute no matter what value or type of data is supposed to be required. The "do ....while" loops syntax is as follows
do
{
block of code
} while (condition is satisfied);
Note that a semi-colon ( ; ) must be used at the end of the do ...while loop. This semi-colon is needed because it instructs whether the while (condition) statement is the beginning of a while loop or the end of a do ...while loop. Here is an example of the use of a do loop.
include %26lt;stdio.h%26gt;
int main(void)
{
int value, r_digit;
printf(“Enter a number to be reversed.\n”);
scanf(“%d”, %26amp;value);
do
{
r_digit = value % 10;
printf(“%d”, r_digit);
value = value / 10;
} while (value != 0);
printf(“\n”);
return 0;
}
for
The third and last looping construct in C is the for loop. The for loop can execute a block of code for a fixed or given number of times. Its syntax is as follows.
for (initializations;test conditions;increment value)
{
block of code
}
The simplest way to understand for loops is to study several examples.
First, here is a for loop that counts from 1 to 10.
for (count = 1; count %26lt;= 10; count++)
{
printf("%d\n",count);
}
The test conditions may be unrelated to the variables being initialized and updated. Here is a loop that counts until a user response terminates the loop.
for (count = 1; response != 'N'; count++)
{
printf("%d\n",count);
printf("Dam man, you still want to continue? (Y/N): \n");
scanf("%c",%26amp;response);
}
More complicated test conditions are also allowed. Suppose the user of the last example never enters "N", but the loop should terminate when 100 is reached, regardless.
for (count = 1; (response != 'N') %26amp;%26amp; (count %26lt;= 100); count++)
{
printf("%d\n",count);
printf("Dam man, you still want to continue? (Y/N): \n");
scanf("%c",%26amp;response);
}
It is also possible to have multiple initializations and multiple actions. This loop starts one counter at 0 and another at 100, and finds a midpoint between them. (This is advanced material).
for (i = 0, j = 100; j != i; i++, j--)
{
printf("i = %d, j = %d\n",i,j);
}
printf("i = %d, j = %d\n",i,j);
All of the constituent parts of the statement are optional. The initialization, condition, termination sections of the for loop can be blank. For instance, suppose we need to count from a user specified number to 100. The first semicolon is still required as a place keeper
printf("Enter a number to start the count: ");
scanf("%d",%26amp;count);
for ( ; count %26lt; 100 ; count++)
{
printf("%d\n",count);
}
The actions are also optional. Here is a silly example that will repeatedly echo a single number until a user terminates the loop;
for (number = 5; response != 'Y';)
{
printf("%d\n",number);
printf("You still want to look at this? (Y/N) \n");
scanf("%c",%26amp;response);
}
subject should be "c book"
firozahmed143@rediffmail.com
Can any one of you give me definition of looping statements in c-programming?
a computer program that performs a series of instructions repeatedly until some specified condition is satisfied
you can do looping using
1. for loop
e-g for (i=0; i %26lt; = 100; i ++)
{
blah blah blah
}
2. while loop
e-g: while(i %26lt; 34)
{
do this;
i++;
}
3. do while loop
for more help
http://www.sysprog.net/cloop.html
Reply:Definition: A loop is a way of repeating a statement a number of times until some way of ending the loop occurs. It might be run for a preset number of times, typically in a for loop, repeated as long as an expression is true (a while loop) or repeated until an expression becomes false in a do while loop.
Loops can be created to execute a block of code for a fixed number of times or (e.g. 7 or 17 or 70). Alternatively, loops can be created to repetitively execute a block of code until a condition changes to a wanted state. For instance, the loop may continue until a condition changes from false to true, or from true to false. In this case, the block of code being executed must update the condition being tested in order for the loop to terminate at some point. If the test condition does not change somehow within the loop, the loop will never terminate - the so known 'endless loop'. This is logical error.
* use the while loop
* use the do ...while loop
* use the for loop
The while loop is used to execute a block of code as long as some condition is true. If the condition is false from the start the block of code is not executed at al. The while loop tests the condition before it's executed so sometimes the loop may never be executed if initially the condition is not met. Its syntax is as follows.
while (tested condition is satisfied)
{
block of code
}
In all constructs, curly braces should only be used if the construct is to execute more than one line of code. The above program executes only one line of code so it not really necessary (same rules apply to if...else constructs) but you can use it to make the program seem more understandable or readable.
Here is a simple example of the use of the while loop. This program counts from 1 to 100.
#include %26lt;stdio.h%26gt;
int main(void)
{
int count = 1;
while (count %26lt;= 100)
{
printf("%d\n",count);
count += 1; // Notice this statement
}
return 0;
}
Note that no semi-colons ( ; ) are to be used after the while (condition) statement. These loops are very useful because the condition is tested before execution begins. However i never seem to like these loops as they are not as clear to read as the do ...while loops. The while loop is the favorite amongst most programmers but as for me, i definitely prefer the do ...while loop.
do ....while
The do loop also executes a block of code as long as a condition is satisfied. The difference between a "do ...while" loop and a "while {} " loop is that the while loop tests its condition before execution of the contents of the loop begins; the "do" loop tests its condition after it's been executed at least once. As noted above, if the test condition is false as the while loop is entered the block of code is never executed. Since the condition is tested at the bottom of a do loop, its block of code is always executed at least once.
Some people don't like these loops because it is always executed at least once. When i ask them "so what?", they normally reply that the loop executes even if the data is incorrect. Basically because the loop is always executed, it will execute no matter what value or type of data is supposed to be required. The "do ....while" loops syntax is as follows
do
{
block of code
} while (condition is satisfied);
Note that a semi-colon ( ; ) must be used at the end of the do ...while loop. This semi-colon is needed because it instructs whether the while (condition) statement is the beginning of a while loop or the end of a do ...while loop. Here is an example of the use of a do loop.
include %26lt;stdio.h%26gt;
int main(void)
{
int value, r_digit;
printf(“Enter a number to be reversed.\n”);
scanf(“%d”, %26amp;value);
do
{
r_digit = value % 10;
printf(“%d”, r_digit);
value = value / 10;
} while (value != 0);
printf(“\n”);
return 0;
}
for
The third and last looping construct in C is the for loop. The for loop can execute a block of code for a fixed or given number of times. Its syntax is as follows.
for (initializations;test conditions;increment value)
{
block of code
}
The simplest way to understand for loops is to study several examples.
First, here is a for loop that counts from 1 to 10.
for (count = 1; count %26lt;= 10; count++)
{
printf("%d\n",count);
}
The test conditions may be unrelated to the variables being initialized and updated. Here is a loop that counts until a user response terminates the loop.
for (count = 1; response != 'N'; count++)
{
printf("%d\n",count);
printf("Dam man, you still want to continue? (Y/N): \n");
scanf("%c",%26amp;response);
}
More complicated test conditions are also allowed. Suppose the user of the last example never enters "N", but the loop should terminate when 100 is reached, regardless.
for (count = 1; (response != 'N') %26amp;%26amp; (count %26lt;= 100); count++)
{
printf("%d\n",count);
printf("Dam man, you still want to continue? (Y/N): \n");
scanf("%c",%26amp;response);
}
It is also possible to have multiple initializations and multiple actions. This loop starts one counter at 0 and another at 100, and finds a midpoint between them. (This is advanced material).
for (i = 0, j = 100; j != i; i++, j--)
{
printf("i = %d, j = %d\n",i,j);
}
printf("i = %d, j = %d\n",i,j);
All of the constituent parts of the statement are optional. The initialization, condition, termination sections of the for loop can be blank. For instance, suppose we need to count from a user specified number to 100. The first semicolon is still required as a place keeper
printf("Enter a number to start the count: ");
scanf("%d",%26amp;count);
for ( ; count %26lt; 100 ; count++)
{
printf("%d\n",count);
}
The actions are also optional. Here is a silly example that will repeatedly echo a single number until a user terminates the loop;
for (number = 5; response != 'Y';)
{
printf("%d\n",number);
printf("You still want to look at this? (Y/N) \n");
scanf("%c",%26amp;response);
}
C programming help needed?
My lecturer gave me an assignment bout "The Personal Expenditure Record Book" where user can add data,edit,search,list and delete the data. The program also can calculate the user expenses per month. For a student like me this assignment really high level. And I really2 need help from the master of C programming
C programming help needed?
This is a non-trivial assignment if you have to write it from scratch in C. What development environment are you using?? How long were you given to to the assignment?? Does it have to save entered data between runs (like a real progam) ??
Ok this stuff isn't all that hard. It just has a number of different types of tasks. You can allocate one to each person.
1) You have to design a structure that will hold the record
2) You have to have a routine that uses 'sprintf' and 'scanf' to put the record into a string (and put the string back into a record) that can be saved to a text file, one record per line.
3) You have to have a way of putting menus on the screen and prompting the user to enter a selection
4) You have to be able to prompt for additional information (eg a search string) when processing a menu request
5) You have to have a screen that allows you to list the records and be able to select them for deletion or editing
6) You have to have a screen that prompts for the record information and stores it in the C-structure.
When it starts up, it will open the datafile and populate an array of record structures. When you exit the program, it will write the current content of the array back to a data file.
Altogether it is quite a lot of work. But each module should be something that one person can do in a couple of hours, depending what amount of C that they know.
Focus first on the core functions, and then add the less important ones later. eg you need a menu system and a way to get data from the user and store it in an array of structures, and list them back to the screen. editing/deleting/searching/saving to a file can all come later.
Good luck!
C programming help needed?
This is a non-trivial assignment if you have to write it from scratch in C. What development environment are you using?? How long were you given to to the assignment?? Does it have to save entered data between runs (like a real progam) ??
Ok this stuff isn't all that hard. It just has a number of different types of tasks. You can allocate one to each person.
1) You have to design a structure that will hold the record
2) You have to have a routine that uses 'sprintf' and 'scanf' to put the record into a string (and put the string back into a record) that can be saved to a text file, one record per line.
3) You have to have a way of putting menus on the screen and prompting the user to enter a selection
4) You have to be able to prompt for additional information (eg a search string) when processing a menu request
5) You have to have a screen that allows you to list the records and be able to select them for deletion or editing
6) You have to have a screen that prompts for the record information and stores it in the C-structure.
When it starts up, it will open the datafile and populate an array of record structures. When you exit the program, it will write the current content of the array back to a data file.
Altogether it is quite a lot of work. But each module should be something that one person can do in a couple of hours, depending what amount of C that they know.
Focus first on the core functions, and then add the less important ones later. eg you need a menu system and a way to get data from the user and store it in an array of structures, and list them back to the screen. editing/deleting/searching/saving to a file can all come later.
Good luck!
C++ Programming by a 12 year old?
I'm 12 years old and I want to get into programming. I started with BASIC and got pretty good at it. I want to get into C programming. Any ideas on what I should do?
C++ Programming by a 12 year old?
Well first get a compiler, like Dev-C++ it's free and you can find it anywhere, when you get the compiler you need to learn the language go to: www.developerfusion.co.uk and go to the C/C++ part of the site and read some tutorials and articles you will learn the language in no time.
I started programming at your age, now i'm 17 and i know like 5 or 6 programming languages!! Keep it this way and you will make money real fast!!! when you know some languages and you become an expert try: www.rentacoder.com to find some jobs...
Good Luck :)
Reply:go for it im 12 and im in b programing
Reply:Best way? Purchase a book called c++ for dummies, your local bookstore should have it!
Reply:I'm a very young developer like you, but I'm not doing C++. Some languages I know are VB, C, and C#, all very good. If you want to learn C++ at 12, you're just plain crazy. C++ is the hardest and most complex languages out there, and was dropped as the main computer language in computer science classes in college because of it. They weren't even able to scratch the surface in a whole semester. If you want to move on with your programming, I recommend C (plain C), or C#, or even try going towards a event-oriented language like Pascal, which is great for increasing your skills, but is similar to C so it can be used as a preparation also. Hope that helps!
P.S. If you ever start programming for palm C and Pascal are as good as it gets (with the exception of C++) Oh and About's C tutorial is very good too!
For a compiler, I HIGHLY recommend Microsoft's Visual Express series. They are all free, and there is one for every major language (C++ does C also).
Reply:https://www.learnvisualstudio.net/login....
Reply:You could check this C++ tutorial from About.com:
http://cplus.about.com/od/beginnerctutor...
Here are a couple of free C++ compilers that were rated as good by Download.com users:
Bloodshed Dev-C++ 4.9.9.2 - http://www.download.com/Bloodshed-Dev-C-...
Digital Mars C/C++ Compiler 8.47 - http://www.download.com/Digital-Mars-C-C...
C++ Programming by a 12 year old?
Well first get a compiler, like Dev-C++ it's free and you can find it anywhere, when you get the compiler you need to learn the language go to: www.developerfusion.co.uk and go to the C/C++ part of the site and read some tutorials and articles you will learn the language in no time.
I started programming at your age, now i'm 17 and i know like 5 or 6 programming languages!! Keep it this way and you will make money real fast!!! when you know some languages and you become an expert try: www.rentacoder.com to find some jobs...
Good Luck :)
Reply:go for it im 12 and im in b programing
Reply:Best way? Purchase a book called c++ for dummies, your local bookstore should have it!
Reply:I'm a very young developer like you, but I'm not doing C++. Some languages I know are VB, C, and C#, all very good. If you want to learn C++ at 12, you're just plain crazy. C++ is the hardest and most complex languages out there, and was dropped as the main computer language in computer science classes in college because of it. They weren't even able to scratch the surface in a whole semester. If you want to move on with your programming, I recommend C (plain C), or C#, or even try going towards a event-oriented language like Pascal, which is great for increasing your skills, but is similar to C so it can be used as a preparation also. Hope that helps!
P.S. If you ever start programming for palm C and Pascal are as good as it gets (with the exception of C++) Oh and About's C tutorial is very good too!
For a compiler, I HIGHLY recommend Microsoft's Visual Express series. They are all free, and there is one for every major language (C++ does C also).
Reply:https://www.learnvisualstudio.net/login....
Reply:You could check this C++ tutorial from About.com:
http://cplus.about.com/od/beginnerctutor...
Here are a couple of free C++ compilers that were rated as good by Download.com users:
Bloodshed Dev-C++ 4.9.9.2 - http://www.download.com/Bloodshed-Dev-C-...
Digital Mars C/C++ Compiler 8.47 - http://www.download.com/Digital-Mars-C-C...
Help with c programming?
I am shuffling a deck of cards with c programming using an array and pulling from a function. I got the shuffle done but i need help find the ace of spades and king of spades. The array is just populated with cards 1 - 52. Ace of spades is card 52 and the king of spades is card 51. Can any help me find a way to find those cards after i have shuffled them?
Help with c programming?
So, you have put them into a completely random order. You can either go through and do a linear search, or you could create a structure where the card value maps to an index position in the shuffled deck.
A linear search would be more efficient if you wanted to find it once per shuffle.
An ordered map would be more efficient if you wanted to find it lots of times per shuffle, as it would involve computation to build, but you would not have to search it again to find the location of any card. For example, you can just get the location value of card 51.
Linear search:
int card = 51;
int position=-1;
for (int i =0; i%26lt;52; i++){
if (cards[i] == card){
position = i;
break;
}
}
This will exit with the position of card number 51, or -1 if not found.
Map:
int[52] cardmap;
for(int i =0; i%26lt;52; i++){
cardmap[cards[i]]=i;
}
This will create an array called cardmap, the position in the array cards of a card with value i can simply be obtained by getting the value at cardmap[i]. e.g. if card 51 was at position 4, cardmap[51] = 4.
Reply:That is going to be quite difficult. If you are still stuck may be you can contact a programming expert live at website like http://askexpert.info/
flower menings
Help with c programming?
So, you have put them into a completely random order. You can either go through and do a linear search, or you could create a structure where the card value maps to an index position in the shuffled deck.
A linear search would be more efficient if you wanted to find it once per shuffle.
An ordered map would be more efficient if you wanted to find it lots of times per shuffle, as it would involve computation to build, but you would not have to search it again to find the location of any card. For example, you can just get the location value of card 51.
Linear search:
int card = 51;
int position=-1;
for (int i =0; i%26lt;52; i++){
if (cards[i] == card){
position = i;
break;
}
}
This will exit with the position of card number 51, or -1 if not found.
Map:
int[52] cardmap;
for(int i =0; i%26lt;52; i++){
cardmap[cards[i]]=i;
}
This will create an array called cardmap, the position in the array cards of a card with value i can simply be obtained by getting the value at cardmap[i]. e.g. if card 51 was at position 4, cardmap[51] = 4.
Reply:That is going to be quite difficult. If you are still stuck may be you can contact a programming expert live at website like http://askexpert.info/
flower menings
Where can i get an introduction book for c programming language?
I don't know bout ur country so I cannot tell
u where to buy, but I can definitely tell u
what to buy.
Book Name :: Let us C
Author :: Yashwant Kanitkar (India)
Where can i get an introduction book for c programming language?
The best book I recommend is the "Complete Reference in C - Herbet Schieldt"
Reply:THE LOCAL PUBLIC LIBRARY - (unless you live in some small crap town) - -- or any book or often computer store
Reply:Well these books might be good for a programmer but for absolute novices "C For Dummies" is the best. It focuses on the basics right from the start. Available from IDG books California. Check out http://www.fordummies.com
In India:: IDG Books India Daryaganj,New Delhi www.idgbooksindia.com
u where to buy, but I can definitely tell u
what to buy.
Book Name :: Let us C
Author :: Yashwant Kanitkar (India)
Where can i get an introduction book for c programming language?
The best book I recommend is the "Complete Reference in C - Herbet Schieldt"
Reply:THE LOCAL PUBLIC LIBRARY - (unless you live in some small crap town) - -- or any book or often computer store
Reply:Well these books might be good for a programmer but for absolute novices "C For Dummies" is the best. It focuses on the basics right from the start. Available from IDG books California. Check out http://www.fordummies.com
In India:: IDG Books India Daryaganj,New Delhi www.idgbooksindia.com
What is C Programming,C++Programing,visu... and Java?
and what is the difference among them
What is C Programming,C++Programing,visu... and Java?
Most programming languages like the ones above have the same basic principals but there syntax varies. Visual Basic is by far the easiest and best way to make a nice looking GUI application. Java is better for websites. C++ is just a new version of C i've never used it but i've seen the syntax and it is based on java. C++ is mainly used in video game design but it can be used for other things as well.
Reply:C is a programming language in which software are developed
C++ is the next version of C and is not structured like C. This is the only difference between C and C++.
The latest version is C ##
Java is the script and is case sensitive, VB is the another script and is used for making GUI whereas Java is for developing the embedded programmes
Nowadays these are the programming lanuages which are being used by most of the developers. The latest revolution is Dotnet
blue flowers
What is C Programming,C++Programing,visu... and Java?
Most programming languages like the ones above have the same basic principals but there syntax varies. Visual Basic is by far the easiest and best way to make a nice looking GUI application. Java is better for websites. C++ is just a new version of C i've never used it but i've seen the syntax and it is based on java. C++ is mainly used in video game design but it can be used for other things as well.
Reply:C is a programming language in which software are developed
C++ is the next version of C and is not structured like C. This is the only difference between C and C++.
The latest version is C ##
Java is the script and is case sensitive, VB is the another script and is used for making GUI whereas Java is for developing the embedded programmes
Nowadays these are the programming lanuages which are being used by most of the developers. The latest revolution is Dotnet
blue flowers
Subscribe to:
Posts (Atom)