<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-63435307938471569</id><updated>2011-07-30T19:26:44.491-07:00</updated><title type='text'>c++ syntax</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default?start-index=101&amp;max-results=100'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>161</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-6282727265615543205</id><published>2009-07-14T22:11:00.003-07:00</published><updated>2009-07-14T22:11:49.306-07:00</updated><title type='text'>Pow() error in Visual C++ 2005?</title><content type='html'>I am using Visual C++ 2005 to write code a win32 console application.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;There was an error message about the power function when I compiled the code. It is: error c2668: 'pow' :ambiguous call to overloaded function.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The statement is:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;tempDistance += pow((data[selectedInstance][k]-data[j][k...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I used various headers like:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;%26lt;cmath%26gt;, %26lt;math.h%26gt; %26lt;valarray%26gt; and %26lt;complex%26gt; but the error message remained the same.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;What is the cause of the error? I've checked the syntax and it seems correct.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Pow() error in Visual C++ 2005?&lt;br&gt;double pow(double x,double y) (from math.h); there you also have powf (for float) and powl ofr long double); Check how you declared tempDistance and the array! The compiler doesn't know what conversion to apply in your case...&lt;br&gt;Reply:What?&lt;br&gt;Reply:Double check the data type of your argument to the pow() function.  There is likely more than one overload of pow() that will do what you want, but the compiler can't decide which one to use.  Just stick and explicit cast in there and be done with it.  To wit:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;pow( double(data[selectedInstance]........&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Note the insertion of a double() constructor!&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Or use old-fashioned C-style cast:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;(double)(arg)&lt;br&gt;Reply:Here is what I'm finding as the problem, pow(int, int) has been removed from math.h.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;1. Look at the data type of your arguments. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;2. Look at the data type of your variable. (tempDistance)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The compiler is trying to figure it what to use when it just can't.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;if you haven't written overloaded functions yet the error might not make much sense to you.  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;(Remember that pow(int,int) is gone. )&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://2flash-cards.blogspot.com/&gt;flash cards&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-6282727265615543205?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/6282727265615543205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/pow-error-in-visual-c-2005.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6282727265615543205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6282727265615543205'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/pow-error-in-visual-c-2005.html' title='Pow() error in Visual C++ 2005?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-3710735865185363688</id><published>2009-07-14T22:11:00.002-07:00</published><updated>2009-07-14T22:11:33.583-07:00</updated><title type='text'>Switch/case statement in C help please?</title><content type='html'>The problem is make a program that will display a corresponding letter grade to the ff. input values: A for 90 above, B for 80-89, C for 70-79, D for 60-69, and F for below 60 using switch/case statements. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;The limits for A are 90%26lt;=A%26lt;=100; for 50%26lt;=F%26lt;=59. The default statement is "out of range". How do you input the syntax for the cases, complete with the %26lt;= and %26gt;= conditions? Just one example of a case (to follow and continue) will be great, thanks.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Switch/case statement in C help please?&lt;br&gt;in cases, we can't use %26lt;= or %26gt;=&lt;br&gt;&lt;br /&gt;&lt;br /&gt;one way to solve ur problem wud be:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int num,A,B,C,D,F;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;printf("Enter a number:  ");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;scanf("%d",%26amp;num);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;switch(A)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;case 90:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;case 91:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;/*&lt;br&gt;&lt;br /&gt;&lt;br /&gt;..&lt;br&gt;&lt;br /&gt;&lt;br /&gt;.. u can fill the values in between..&lt;br&gt;&lt;br /&gt;&lt;br /&gt;*/&lt;br&gt;&lt;br /&gt;&lt;br /&gt;case 100: printf("grade is A"); break;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;case 80:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;case 81:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;/*&lt;br&gt;&lt;br /&gt;&lt;br /&gt;..&lt;br&gt;&lt;br /&gt;&lt;br /&gt;.. fill the in between values&lt;br&gt;&lt;br /&gt;&lt;br /&gt;*/&lt;br&gt;&lt;br /&gt;&lt;br /&gt;case 89: printf("grade is B"); break;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;/* similarly for other grades..  just remember to put break; statement on the last value of a given range for a grade */&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;default: printf("The number is out of range");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;Reply:You need to use if/else statement.  Switch won't allow that type of checking.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-3710735865185363688?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/3710735865185363688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/switchcase-statement-in-c-help-please.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3710735865185363688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3710735865185363688'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/switchcase-statement-in-c-help-please.html' title='Switch/case statement in C help please?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-587655350172307333</id><published>2009-07-14T22:11:00.001-07:00</published><updated>2009-07-14T22:11:17.872-07:00</updated><title type='text'>Switch/case problem in C language. Help please?</title><content type='html'>Problem: Write a program that accepts an ordinary number and output its equivalent Roman numeral. The ordinary numbers and their equivalent Roman numerals are as follows:  1 corresponds to I ; 5 = V; 10 = X; 50 = L; 100 = C; 500 = D; 1000 = M.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Sample input/output on screen: Enter a number: 2968&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The Roman numeral is: MMCMLXVIII&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Note that maximum input number is 3,000.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I don't know how to do it, it can't possibly mean doing the syntax 3000 times! I think it may have to do with the place values, but I don't know how to work it out. Help please? Thanks.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Switch/case problem in C language. Help please?&lt;br&gt;To convert an integer into Roman numerals, you'll need to have a "while loop" to repeatedly generate the numerals you want until the result reaches zero.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Inside the loop, you'll have a switch statement that goes something like:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Switch input:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   case input %26gt; 1000&lt;br&gt;&lt;br /&gt;&lt;br /&gt;          output "M"&lt;br&gt;&lt;br /&gt;&lt;br /&gt;          input = input - 1000&lt;br&gt;&lt;br /&gt;&lt;br /&gt;          break&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    case input %26gt; 900&lt;br&gt;&lt;br /&gt;&lt;br /&gt;          output "XM"&lt;br&gt;&lt;br /&gt;&lt;br /&gt;          input = input - 900&lt;br&gt;&lt;br /&gt;&lt;br /&gt;          break&lt;br&gt;&lt;br /&gt;&lt;br /&gt;      ...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;      ...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;End Switch&lt;br&gt;Reply:From old memories.. look at the dragon book for compilers.  I vaguely recall it having this case as an example for illustrating scanning or parsing.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;read from left to right.  for every letter that represents a value  greater than the most recent one that you have read in, subtract the smaller one from the bigger one.  At the same time, if you come across an X, add 10 to some variable.  If you read IX, add 1 to a variable and remember 1 in a temp variable.  if the temp is lesser than the next one, say in this case, X(=10), then subtract the temp from the grand total, and add present-temp to the grand total.  This way, you should be able to work out.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Anyway, this came to me off handed and might need some fine tuning.&lt;br&gt;Reply:Pseudo-code sample could be something like:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;char input[];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;char output[];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int number;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;for(i=0;i%26lt;sizeof(input)/sizeof(char);i...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;number = atoi(input[i]);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;switch(number)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;case 1:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  if(number%1000) output[i]="M";&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  else(number%100) output[i]="C";&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  else(number%10) output[i]="X";&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  else output[i]="I";&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  break;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;But you'll need to extend this and write it out properly, cos I couldn't be bothered ;-)&lt;br&gt;Reply:No need for a switch statement at all. The Cleanest that I can think of would be this:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void PrintRoman (int Number)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;char Roman[100];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int Position = 0;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;while (Number %26gt;= 1000)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Roman[Position++] = 'M';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Number -= 1000;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;if (Number %26gt;= 900)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Roman[Position++] = 'C';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Roman[Position++] = 'M';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Number -= 900;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;if (Number %26gt;= 500)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Roman[Position++] = 'D';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Number -= 500;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;while (Number %26gt;= 100)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Roman[Position++] = 'C';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Number -= 100;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;if (Number %26gt;= 90)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Roman[Position++] = 'X';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Roman[Position++] = 'C';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Number -= 90;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;if (Number %26gt;= 50)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Roman[Position++] = 'L';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Number -= 50;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;while (Number %26gt;= 10)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Roman[Position++] = 'X';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Number -= 10;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;if (Number %26gt;= 9)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Roman[Position++] = 'I';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Roman[Position++] = 'X';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Number -= 9;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;if (Number %26gt;= 5)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Roman[Position++] = 'V';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Number -= 5;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;if (Number %26gt;= 4)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Roman[Position++] = 'I';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Roman[Position++] = 'V';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Number -= 4;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;while (Number %26gt;= 1)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Roman[Position++] = 'I';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   Number -= 1;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Roman[Position] = '\0';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;printf ("Roman is %s\n", Roman)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;There are more compact ways to write this using either parallel arrays or a structure, but for clarity, the above is best.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://flower-girl2.blogspot.com/&gt;flower girl&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-587655350172307333?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/587655350172307333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/switchcase-problem-in-c-language-help.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/587655350172307333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/587655350172307333'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/switchcase-problem-in-c-language-help.html' title='Switch/case problem in C language. Help please?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-8501861799231870687</id><published>2009-07-14T22:11:00.000-07:00</published><updated>2009-07-14T22:11:01.633-07:00</updated><title type='text'>Query format for date incorrect using C#?</title><content type='html'>This query results in a syntax error.  The error message makes mention of a missing operator, but I think it is a format problem with the date.  I've searched the internet and all of my books and there is very little information on how to properly format a date/time query in Visual C Sharp.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;This is the query that contains an error.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;NOTE: I HAD TO ADD SPACES  IN ORDER TO VIEW THE CODE HERE.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;"SELECT DateTime FROM Events WHERE " + monthCalendar1. SelectionStart. AddDays(4). ToString() + " %26lt; DateTime"&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Ive tried using "BETWEEN "+ monthCalendar1. SelectionStart.  AddDays(4). ToString() +" AND DateTime"&lt;br&gt;&lt;br /&gt;&lt;br /&gt;but had the same error&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;there must be a problem with the format of monthCalendar1. SelectionStart. AddDays(4). ToString()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I hope there are some knowledgeable C# programmers out there with experience working with databases!&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Query format for date incorrect using C#?&lt;br&gt;1) You have not specified the field in the where clause&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;"SELECT DateTime FROM Events WHERE FIELDNAME BETWEEN " + monthCalendar1. what ever&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;2) When you are using date values and passing to Sql, you need to format it&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;example: SELECT * FROM example WHERE exampledate between '2007-01-01' &lt;br&gt;&lt;br /&gt;&lt;br /&gt;AND '2007-06-10'&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-8501861799231870687?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/8501861799231870687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/query-format-for-date-incorrect-using-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8501861799231870687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8501861799231870687'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/query-format-for-date-incorrect-using-c.html' title='Query format for date incorrect using C#?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-6202949580410022817</id><published>2009-07-14T22:10:00.002-07:00</published><updated>2009-07-14T22:10:45.593-07:00</updated><title type='text'>Lowercase to Uppercase C++ program?</title><content type='html'>Can someone create a C++ program for me that will convert  lowercase letters to uppercase letters and will stop when the user inputs a non-lowercase character? I'd like it to be simple and only use iostream as the header file. Please, no if statements, just a while loops, cout, cin, endl, and proper syntax. Thnx!&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Lowercase to Uppercase C++ program?&lt;br&gt;use toupper,tolower,isalpha functions&lt;br&gt;Reply:What for? C has built-in funtions do that.&lt;br&gt;Reply:I'll let you do your own homework, but I'll give you a hint.  A character is really just an int.  The mapping of characters  to their numeric ASCII values is well defined.  Capital A=65, B=66, all the way to Z=90.  Lower case letters are a=97 to z=122.  Converting a lowercase letter to its uppercase counterpart can be simply a matter of subtraction.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Here's a link to an ascii chart, but I'm sure your text book has one.  http://www.asciitable.com/&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-6202949580410022817?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/6202949580410022817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/lowercase-to-uppercase-c-program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6202949580410022817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6202949580410022817'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/lowercase-to-uppercase-c-program.html' title='Lowercase to Uppercase C++ program?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-6691605728849022955</id><published>2009-07-14T22:10:00.001-07:00</published><updated>2009-07-14T22:10:29.702-07:00</updated><title type='text'>AS/400 and C++ :::for video game developement which is best?</title><content type='html'>I am getting to go to school for developing video games. I have heard a great deal about C++, but not much about AS/400. I have read all about it AS/400 in Wikopedia. When I did a search for video game development employment, I read that many are asking for this language. Can someone tell me if I had to learn only one which one should I learn and why? If I could learn both, which one should I base my emphasis in? I did notice that they are different in structure and syntax so learning one will not benefit the other too much other than in concept of ideas.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;AS/400 and C++ :::for video game developement which is best?&lt;br&gt;While C is native on the AS/400, this is not a gaming system but rather a business batch job processing and DBMS system primarily used for medium to large scale data storage and manipulation like data warehousing and ERP applications.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;It is good to learn how to logically think so you can apply logic to any programming language.  Once you are able to break a large problem down into smaller pieces, you are well on your way to being a programmer.  Remember, LOGIC will NEVER change, only the syntax will.......&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;If you are looking for game programming, the AS/400 is not where you should be looking.&lt;br&gt;Reply:The AS/400 is an IBM midrange computer (a small step down from a mainframe).  It is not a complier.  They are probably referring to C++ on an AS/400.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-6691605728849022955?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/6691605728849022955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/as400-and-c-for-video-game-developement.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6691605728849022955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6691605728849022955'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/as400-and-c-for-video-game-developement.html' title='AS/400 and C++ :::for video game developement which is best?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-2403707082628097435</id><published>2009-07-14T22:10:00.000-07:00</published><updated>2009-07-14T22:10:13.642-07:00</updated><title type='text'>Write a c program to store and edit the records?</title><content type='html'>for eg.if i give"create table tablename(name,varchar(10),salary,(10,2)... program should parse the given statement and check if the syntax is correct.if it is correct,then a structure should be created with the same tablename with name and salary in it.i am just a beginner so dont go deeply into sql or anything.i need a c program just to parse and check a given statement.only the statement is similar to that in sql.like this i have to do for select,insert,delete and update.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Write a c program to store and edit the records?&lt;br&gt;Best option would be to use LEX and YACC to parse the ddl statements.  Then you could use a flat file (with your predefined formats for your name/salary fields) to populate the objects.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The scope for coding is beyond the means of this group.  I guess you have a good starting point though.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://curse-of-the-golden-flower.blogspot.com/&gt;curse of the golden flower&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-2403707082628097435?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/2403707082628097435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/write-c-program-to-store-and-edit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2403707082628097435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2403707082628097435'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/write-c-program-to-store-and-edit.html' title='Write a c program to store and edit the records?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-5439525163587240816</id><published>2009-07-14T22:09:00.003-07:00</published><updated>2009-07-14T22:09:57.688-07:00</updated><title type='text'>From C to Java?</title><content type='html'>in C ; when i have a variable called for example first; i can say 'first' and it returns to me the ASCII of the value of that variable, either it was character,integer,.....;  How can i do this in Java (i want a method or a syntax that enables me to get the Unicode value of any Object)&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;From C to Java?&lt;br&gt;well you can type cast a variable&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;example&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;char myChar = 'A';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int myInt = (int)myChar;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;it will return the ascii value of that char&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;or &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;string str = new string("blah");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;str.getBytes() // returns a array of character encodeing&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;good luck&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-5439525163587240816?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/5439525163587240816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/from-c-to-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/5439525163587240816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/5439525163587240816'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/from-c-to-java.html' title='From C to Java?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-4391719066692609757</id><published>2009-07-14T22:09:00.002-07:00</published><updated>2009-07-14T22:09:42.026-07:00</updated><title type='text'>Java/C# Programming book with example projects?</title><content type='html'>I'm looking for a C# or Java textbook that's unlike most books in that it has exercises and suggested projects, instead of just detailing the language's syntax  and whatnot. If it has the solutions, that would be fantastic too. Similarly, I'm also looking for a book that will guide me towards creating a usable, complex application. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I've had no luck in my search. Thank you for reading.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Java/C# Programming book with example projects?&lt;br&gt;I like Professional C# from Wrox:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;http://www.amazon.com/Professional-C-Pro...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;It focuses on learning the language by building progressively more complex programs, and includes all of the code for each example and breakdown of what it does. Subsequent chapters also build on previous ones by adding new or more complex functionality to previous examples you've already done. Towards the end of the book, the examples begin to approach real-world practical functionality.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I have about 15 Wrox books in my library - they're great.&lt;br&gt;Reply:not a book, but here's a website with sample codes:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Planet Source Code&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;http://www.pscode.com&lt;br&gt;Reply:All the books mentioned before are great, but I recommend going to a local university bookstore where they sell textbooks. There you are going to find books that show you how to program and written with chapter reviews, exercises and test questions because they were designed for classes.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I always recommend Apress books, I find visual blueprint series great (doesn't have questions but the way they wrote the book is exampled everywhere on every page) and some wrox books are good and some are dry. My favorite series of all time though has to be the Sams teach yourself series. Great beginner books and I use them to break into a new language every time.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Good luck!&lt;br&gt;Reply:I always suggest the APRESS range of C# books. They have a great beginner to professional and then expert range of books. Not only do they cover C# core but also have great books on specific technologies like ASP.NET, Web Services, REST, Architecture design(CSLA), Windows Communication Foundation, Windows Workflow Foundation and Atlas/Ajax.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;http://www.apress.com/category.html?nID=...&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-4391719066692609757?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/4391719066692609757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/javac-programming-book-with-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4391719066692609757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4391719066692609757'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/javac-programming-book-with-example.html' title='Java/C# Programming book with example projects?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-560557728217585327</id><published>2009-07-14T22:09:00.001-07:00</published><updated>2009-07-14T22:09:25.853-07:00</updated><title type='text'>In C Programming, Whats the difference of Contrast Arrays and Structs?</title><content type='html'>In C Programming, i've been self studying... and i am now in arrays but confused with these 2 on the book Contrast Arrays and Structs Difference. They both handles information but whats the difference? And even in syntax, are they both different?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;In C Programming, Whats the difference of Contrast Arrays and Structs?&lt;br&gt;example an array can only hold on data type. if you define an array of 10 integers then you can hold 10 integers only. The way it actually works is it allocates the memory for 10 integers and lays it out in memory in contiguous memory.  Arrays have to be indexed to get/put data.  in c you would define an array like int myArray[10] that would be an array of integers.  To access the first item you could write myArray[0].&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;A struct can hold multiple data types in it.  You can build the following struct&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;struct TEST{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;double myDouble;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int   myInt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;} typedef test;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;this struct hold a double and an int.  They are laid out in consecutive memory like an array, but you do not index it.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;example&lt;br&gt;&lt;br /&gt;&lt;br /&gt;test myTest;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;myTest.myDouble = 3.5;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;myTest.myInt = 2;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;you could have an array of structs, or even a struct with an array in it..&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;array of structs example:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;test myTest[10]&lt;br&gt;&lt;br /&gt;&lt;br /&gt;myTest[0].myDouble = 3.5;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;myTest[0].myInt = 2;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;myTest[1].myDouble = 2.5;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;index 0 in the array sets the integer to 2 and the double to 3.5.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;index 1 sets the double to 2.5&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;struct with an array example&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;struct TEST2&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    int     intArray[10];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   double  myDouble;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;} typedef test2 ;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;test2 myTest;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;myTest.intArray[0] = 1;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;myTest.intArray[1] = 2;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;myTest.myDouble = 3.5;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Other operation can be performed to access the data in an array and a struct, illustrating how they are laid out in contiguous memory.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;if you are familiar with poitners in c, you know to dereference a ptr you would use *.  well The [ ] used in indexing an array are the same thing as *(myInt+(sizeof(int) * index))&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;so if you declared a pointer and instantiated it to hold 10 times the size of an int, you could index it as if it were an array and vice versa.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int  *myArray;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;myArray = new int[10];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;myArray[5] = 0;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;is the same as&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;*(myArray + (5 * sizeof(int)))&lt;br&gt;Reply:I've never heard of a Contrast Array.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;An array is a collection of variables of a certain type, like 5 integers or 10 characters.  You can access each element by index.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;A struct is a collection of variables.  When you declare an instance of a struct, it creates an instance of each of that struct's variables.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;They are very different in syntax and purpose.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-560557728217585327?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/560557728217585327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/in-c-programming-whats-difference-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/560557728217585327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/560557728217585327'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/in-c-programming-whats-difference-of.html' title='In C Programming, Whats the difference of Contrast Arrays and Structs?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-4454575716289443372</id><published>2009-07-14T22:09:00.000-07:00</published><updated>2009-07-14T22:09:09.977-07:00</updated><title type='text'>When C++ was created, what was the compiler made by Bjarne stroustrup?</title><content type='html'>I can't seem to understand why there are so many compilers out there that suck and each of them produces a different error and none of them is ANSI/ISO compatible fully, while the creator of the language himself should have made the right one! I mean, one of them even says it has a syntax error in one of its own libraries!&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I'm going to try out eclipse cuz Dev C++ is driving me nuts but I need to get a good compiler! Borland doesn't even have a debugger so what can I do?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;P.S: I only write console applications because I program for contests and training sites like USACO's training site.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Please answer the main question cuz it's the one that's killing me. Where's the original compiler?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;When C++ was created, what was the compiler made by Bjarne stroustrup?&lt;br&gt;Even the "original" compiler had lots of bugs. C++ is a very complex language, making it extremely difficult to create a bug-free compiler. I feel your pain.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Good luck!&lt;br&gt;Reply:Have you tried Microsoft Visual Studio? It comes with a console compiler. You need to set it up, but it works...as long as you aren't on Vista.&lt;br&gt;Reply:Stroustrup did a book, not a compiler.  Everyone has been free to implement their own subset of the C++ language, all along. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I'm on Linux, incidently, so I haven't had to pay for a Borland Compiler for a while: however the last time I actually bought one (around 2002) it came with an IDE -- Integrated Debugging Editor which certainly worked.  Have you bought a Borland compiler or did you just download it?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Naturally when I hear someone is having trouble with Dev C++ or any implementation of GCC I'm sorry to hear it.  If you are just programming for the console, have you considered DJGPP?  With GDB and GProf GCC does have debugging capabilities.  I've never used CDT but I do wish you luck.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Still, a reasonably complete implementation of the C++ programming language and (separately) the Standard Template Library is available at http://www.digitalmars.com.  Their IDE, which I've never used, is available on their CD which costs $54.  You can download and install a command line version for free.  You also have to install the STL separately, which can be tricky (before I dumped DOS I used a batch file to compile my C++ programs) but once you get it working it is very awesome.&lt;br&gt;Reply:If yo want a good compiler, Go to www.bloodshed.net and download the free Dev C++,&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Good Luck&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Omar&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://1apricot.blogspot.com/&gt;apricot&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-4454575716289443372?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/4454575716289443372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/when-c-was-created-what-was-compiler.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4454575716289443372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4454575716289443372'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/when-c-was-created-what-was-compiler.html' title='When C++ was created, what was the compiler made by Bjarne stroustrup?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-3324310397798813729</id><published>2009-07-14T22:08:00.003-07:00</published><updated>2009-07-14T22:08:54.244-07:00</updated><title type='text'>C++ array question - "removing" an item from an array?</title><content type='html'>If I had an array in C++, with a capacity of 10 items but only 5 items in the array, and I wanted to remove the item located at position 2 in the array...how would I go about doing that?  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I just don't know the syntax...I know that to delete an entire array, you would type:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;delete [] array;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;But for just deleting one item, you can't do something like:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;delete array[2];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;So how would I go about removing that item?  Just set it to zero and move everything else over to fill the gap (putting a zero in the last occupied location of the array), use the null factor or what?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;C++ array question - "removing" an item from an array?&lt;br&gt;Depending on what you want to acheive, resorting an array maybe a waste of time. Array are not the best data structure to insert and delete. Depending on how often you gonna do this operation and the size of your array, this might not be a good idea performence wise.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I usually give a null value to the value I want out and ignore it whenever I browse through the array. If you intend to add and delete stuff from your array very often, your maybe better off with a chained list.&lt;br&gt;Reply:First delete [] array is only to be used to delete an array created with new [] array.  If you want to remove an element from a static array then you will have to copy the remaining elements to the one you wish to remove.  For example&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int array[10];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;//Assume elements placed into array&lt;br&gt;&lt;br /&gt;&lt;br /&gt;for (int i(2); i %26lt; 9; ++i)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    array[i] = array[i + 1];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;array[9] = 0;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;However C++ has something called the standard template library (STL), this is a library as defined by ISO/ANSI as a part of C++, it contains template funcitons and containers, by far the most used container is vector which is a variable length array.  The previous example would become&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;std::vector%26lt;int%26gt; array;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;//Assume elements placed into the vector&lt;br&gt;&lt;br /&gt;&lt;br /&gt;array.erase(array.begin() + 2);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;This is shorter and easier to use, if you want to know more about the STL then read Accelerated C++ by Andrew Koeing  and Barberer E. Moo.&lt;br&gt;Reply:Just a couple of quick notes.  The first poster is correct in saying that you can just move each element forward one space and overwrite the element you wish to delete.  However, there is a caveat.  If the element you wish to delete is a pointer to something that's been allocated using the new operator, you should explicitly delete it first before you overwrite it.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The second poster has a good point, although chained lists are more normally called linked lists.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Third, you can implement the 1st posters suggestion using 1 line using the movemem() function, which would be faster.  But it's easier to screw that up, so I wouldn't recommend it unless you need every bit of speed.&lt;br&gt;Reply:While the most popular method is to move items ahead when deleting (as presented above), there is another way. By moving all the items down in the array you would not have to worry about overflowing your array when using a more familiar looking for loop. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;//code begin &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int removeIndex = 2;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int arrayLength = 10;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;for(int i = removeIndex + 1; i %26lt; arrayLength; i++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    array[i-1] = array[i];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;} &lt;br&gt;&lt;br /&gt;&lt;br /&gt;arrayLength--;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;//end code&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The other information about using delete and checking for invalid removal indexes is applicable, but this code does the trick as well.&lt;br&gt;Reply:Hello&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;You don't need to set it to zero. Do a  FOR function that goes from the desired deletion point to the end that moves a[n+1] into n. So just move all the positions from the desired point one position back. Do a function and appeal it.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;function delarraypos (int n) &lt;br&gt;&lt;br /&gt;&lt;br /&gt;{ cin%26gt;%26gt;n; //desired position&lt;br&gt;&lt;br /&gt;&lt;br /&gt;for (i=n;i%26lt;=m;i++) //m is array length&lt;br&gt;&lt;br /&gt;&lt;br /&gt;a[n]=a[n+1]&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;Reply:Mihai is largely correct, but here are a few more things to be aware of if you are to use his code:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;function delarraypos (int n)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{ cin%26gt;%26gt;n; //desired position&lt;br&gt;&lt;br /&gt;&lt;br /&gt;for (i=n;i%26lt;=m;i++) //m is array length&lt;br&gt;&lt;br /&gt;&lt;br /&gt;a[n]=a[n+1]&lt;br&gt;&lt;br /&gt;&lt;br /&gt;} &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;1. The second element of an array is not array[2], so make sure that you either decrement n or pass in the proper index of the item you want to delete.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;2. If the array length is m, the indices are 0 through m-1, so you don't want to go until m.  Also, since you are going to set a[n]=a[n+1], going all the way to the end will make a[n+1] go past the end of the array, so you really only want to iterate to m-2.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;3. The last element of the array will be left as it is if you do this.  If you want to indicate unused elements of the array with 0, then you need to set array[m-1]=0. This will be important if the element to be deleted is at the end of the array, where there is nothing to move on top of it, if you want to make sure that it is not left with a non-0 value.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;4. If you are concerned with a memory leak due to the array being populated with objects that have been "newed" elsewhere, then you still need to do a "delete array[2]" before rearranging the array to make sure the memory is freed up. Your example of setting the unused elements to 0 implies that this is an array of integers. If that is the case, then there is no need to delete the integer.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;5. If the array's current length "m" is being stored somewhere, you will want to decrement it. (By "current lenngth," I mean how much of the array is filled as opposed to how much memory has been allocated for the array.)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;6. Finally, unless you can be sure that the n value being passed in is good, it is good practice to check that n%26gt;=0 and n%26lt;m, and either throw an exception or assert out. If n is too big, this procedure will mess seriously with your memory in a way that will be hard to track down.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Hope this helps.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-3324310397798813729?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/3324310397798813729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-array-question-removing-item-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3324310397798813729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3324310397798813729'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-array-question-removing-item-from.html' title='C++ array question - &quot;removing&quot; an item from an array?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-8162844787509168555</id><published>2009-07-14T22:08:00.002-07:00</published><updated>2009-07-14T22:08:37.596-07:00</updated><title type='text'>Help for visual C# programming?</title><content type='html'>I was looking for codes/syntax for a game called "Three Shell Game"....its a simple game where there is 3 cups, and a pea or coin is put under one of the cup. The person then tries to guess where the coin is after the cups are move around quickly by owner. But I was looking at making this into a visual C# program...does anyone have codes or program codes for this kind of game or can help me? I only have basic skills on visual C# at the moment&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Help for visual C# programming?&lt;br&gt;Is that game your talikng about is flash game?..... try to download a flash decompiler and see the of the game.. it is a bit similar to c++.&lt;br&gt;Reply:May be you can contact a C# expert at website like http://askexpert.info/&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-8162844787509168555?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/8162844787509168555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/help-for-visual-c-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8162844787509168555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8162844787509168555'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/help-for-visual-c-programming.html' title='Help for visual C# programming?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-6472674225034850869</id><published>2009-07-14T22:08:00.001-07:00</published><updated>2009-07-14T22:08:21.607-07:00</updated><title type='text'>C++ date code question?</title><content type='html'>The following syntax performs what type of function?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Date vDay(2,14,1993);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;a)performs no function&lt;br&gt;&lt;br /&gt;&lt;br /&gt; &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;b) overwrites the previously defined variable vDay&lt;br&gt;&lt;br /&gt;&lt;br /&gt; &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;c) calls an operating system funciton to set the date&lt;br&gt;&lt;br /&gt;&lt;br /&gt; &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;d) defines a new object variable&lt;br&gt;&lt;br /&gt;&lt;br /&gt; &lt;br&gt;&lt;br /&gt;&lt;br /&gt;Thanks to anyone who posts.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;C++ date code question?&lt;br&gt;Technically, e) for none of the above.  But given those choices then d).&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The reason d) is technically wrong is that you define a TYPE not a variable.  The type Date is "defined" somewhere else.  This code is just instantiating an object of that type.&lt;br&gt;Reply:d)&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-6472674225034850869?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/6472674225034850869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-date-code-question.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6472674225034850869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6472674225034850869'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-date-code-question.html' title='C++ date code question?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-7709090346167375320</id><published>2009-07-14T22:08:00.000-07:00</published><updated>2009-07-14T22:08:05.550-07:00</updated><title type='text'>Need help with io in C++, have read much programmed little?</title><content type='html'>I am somewhat familiar with input/output in programming, but am having problems using file io in C++. This is my skeleton type program:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;stdio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;fstream.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int main(int argc, char *argv[])&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{ ifstream filein; ofstream fileout; char ch;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  filein.open("input.txt", ios::in);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  fileout.open("output.txt", ios::out);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  for(filein.get(ch); ch!=EOF; filein.get(ch));&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    fileout.put(ch);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  filein.close();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  fileout.close();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  return 0;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;i created a text file input.txt and output.txt, input has "asd" in it and output is empty, i want it to write the asd to output.txt&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;using EOF it is infinite loop, and using NULL it terminates doing nothing, I have read a lot about c/c++ but this is my first stab at programming in it and it is taking me forever to get all syntax and small stuff takin care of. Please tell me what I am doing wrong. Thank you :)&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Need help with io in C++, have read much programmed little?&lt;br&gt;http://www.cplusplus.com/doc/tutorial/fi...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Please get a better book. The above code is terrible. And outdated.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Just open up two filestreams and transfer one line to another. Use getline to take in entire lines. Store them in strings. As in %26lt;string%26gt; strings.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;EDIT: I'll give you the code. Please get a newer book so you understand what I did.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;iostream%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;fstream%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;string%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;using namespace std;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    string str;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    ifstream infile("input.txt");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    ofstream outfile("output.txt");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    if (infile.is_open())&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        while (!infile.eof() )&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;            getline(infile, str);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;            outfile %26lt;%26lt; str %26lt;%26lt; endl;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        infile.close();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        outfile.close();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    else cout %26lt;%26lt; "Unable to open file";&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    return 0;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;Reply:use ifstream::in and ifstream::out instead!&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://4song-words.blogspot.com/&gt;song words&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-7709090346167375320?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/7709090346167375320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/need-help-with-io-in-c-have-read-much.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/7709090346167375320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/7709090346167375320'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/need-help-with-io-in-c-have-read-much.html' title='Need help with io in C++, have read much programmed little?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-8827035414218122053</id><published>2009-07-14T22:07:00.003-07:00</published><updated>2009-07-14T22:07:49.359-07:00</updated><title type='text'>A random word program for c?</title><content type='html'>Im trying to write a program that will print 8 random words...they dont have to be real words.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The number of characters in the word must also be random...I have some syntax errors and I dont know why!!!!&lt;br&gt;&lt;br /&gt;&lt;br /&gt;%26lt;code snippet%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#define MinLetters 1&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#define MaxLetters 9&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;char RandomWord(void);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt; int n;&lt;br&gt;&lt;br /&gt;&lt;br /&gt; printf(" This program generates 8 random words.\n");&lt;br&gt;&lt;br /&gt;&lt;br /&gt; for(n = 1; n %26lt;= 8; n++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt; {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  printf("%c", RandomWord());&lt;br&gt;&lt;br /&gt;&lt;br /&gt; }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;char RandomWord(void)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt; int i, j;&lt;br&gt;&lt;br /&gt;&lt;br /&gt; &lt;br&gt;&lt;br /&gt;&lt;br /&gt; i = RandomInteger(int MinLetters, int MaxLetters);&lt;br&gt;&lt;br /&gt;&lt;br /&gt; &lt;br&gt;&lt;br /&gt;&lt;br /&gt; for(j = 1; j %26lt;= i j++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt; {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  return (RandomInteger('A', 'Z');&lt;br&gt;&lt;br /&gt;&lt;br /&gt; }&lt;br&gt;&lt;br /&gt;&lt;br /&gt; printf("\n")&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;%26lt;/code snippet%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I have syntax errors in RandomWord before 'int' and before 'j'&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Anybody feel like being a god???? lol&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Thanks in advance guys...hopefully if I figure this language out I can answer some questions instead of asking&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;A random word program for c?&lt;br&gt;i = RandomInteger(int MinLetters, int MaxLetters);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;needs to be changed to &lt;br&gt;&lt;br /&gt;&lt;br /&gt;i = RandomInteger(MinLetters, MaxLetters);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Also where is the seed value for random number generation?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-8827035414218122053?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/8827035414218122053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/random-word-program-for-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8827035414218122053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8827035414218122053'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/random-word-program-for-c.html' title='A random word program for c?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-7613368088876884732</id><published>2009-07-14T22:07:00.002-07:00</published><updated>2009-07-14T22:07:33.456-07:00</updated><title type='text'>Using namespace std;  - this statement is giving an error  in C++...?</title><content type='html'>error is "declaration syntax error"..Whats the reason behind this?? while I am using Turbo C++ 3 or 4.5 version........&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Using namespace std;  - this statement is giving an error  in C++...?&lt;br&gt;you have a problem with your compiler ....check your compiler setting.&lt;br&gt;Reply:using namespace std; &lt;br&gt;&lt;br /&gt;&lt;br /&gt;sounds more like VC++ or Managed C++.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;In Turbo C++, it is likely&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;stdio.h%26gt;&lt;br&gt;Reply:Don't use that (Using namespace std;) in Turbo C++ instead use this (#include %26lt;stdio.h%26gt;) .&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Hope it helps. ^^&lt;br&gt;Reply:check for uppercase letter mistakes. statement should work.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-7613368088876884732?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/7613368088876884732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/using-namespace-std-this-statement-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/7613368088876884732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/7613368088876884732'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/using-namespace-std-this-statement-is.html' title='Using namespace std;  - this statement is giving an error  in C++...?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-7505847521175325161</id><published>2009-07-14T22:07:00.001-07:00</published><updated>2009-07-14T22:07:17.648-07:00</updated><title type='text'>I have to make a big decission! It is Microsoft C# or Linux C! I know just a little bit about c#!?</title><content type='html'>I know nothing about C! &lt;br&gt;&lt;br /&gt;&lt;br /&gt;In the same time I want to catch up with the latest stuff and go with C# but I also want to learn about C in Linux, sockets and a liitle bit of lower level like C(do not give me assembly)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I do not know wich one to start off with first and every single time I decide on something, I try and find tutorials, but I suddenly feel that  want to go back to the other one! It is a weird feeling and I also think I got some mental problem ! Please help me with this and do not tell me to look on the other discovered questions! &lt;br&gt;&lt;br /&gt;&lt;br /&gt;Could I go with both at the same time since they have a similar syntax?? (not really similar but close)&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;I have to make a big decission! It is Microsoft C# or Linux C! I know just a little bit about c#!?&lt;br&gt;I vote for MS C#. I love their new Visual Studio.&lt;br&gt;Reply:Wow, you are really being pulled in 2 directions here.  Coding C on Linux is about as far from C# as you can get.  It will probably be in your benefit to learn C very well (especially pointers) and then move onto C++ before really understanding C#.  C# may look incredibly simple, and it is, but internally it is very complicated.  Fortunately, you rarely have to worry about this complications, but sometimes it will become important, and the average ignorant C# code won't know how or why something is performing as it is.  Note that C# can run on Linux too (lookup Mono).&lt;br&gt;Reply:Learn C# simply because of money. C# programmers can easily make 100,000 a year with just 4 years experience. C programmers are a dime a dozen and average 60-70K a year. C# is quickly becoming the standard in most shops and people are needed. C is old and is not built well and will confuse you when you want to make the jump to C#. C# is highly object-oriented while C is more procedural. That's like asking - should I learn to use an abacus or a calculator... I'd choose calculator any day.&lt;br&gt;Reply:read these links hope thins help...start with ANSI C then go ahead with c++&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;happy coding :)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Cheerz, Steven&lt;br&gt;Reply:You know, if you get the VS C++ Express and VS C# from Microsoft, you can learn both, as far as sockets and networking, those API's are system dependent, basically, the way you make it in Linux is different to the way you do it in Windows, even if you are using plain C.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;C# is a proprietary Microsoft language which gives access to the Microsoft .NET framework (basically a big API arranged by namespaces), all Networking API in Windows and Linux can be accessed using C++, all C functions can also be called by C++, only if you use Gnome GUI programming you will have to use C, but I am sure you can always link the libraries to C++.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Bottom line, learn basic C++, learn the basic algorithms as loops, if else, recursion, array and string manipulation, etc.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Once you master the basic algorithms, start learning learning the use of libraries or APIs.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;If you understand the principles and logic of algorithms, you can apply the same logic to any language (C, C++, C#, Java, VB, etc), learning the syntax can be a few hours depending on how good and experienced you are.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The hardest part is learning the API, because you have to go through all the functions available and figure out what they do and how to use it, for example, Microsoft has the platform SDK for Windows Programming which is in C or C++, MFC is C++ Windows programming, COM is for Windows and its C++, VB has its own Windows API which are kind of similar to the Platform SDK and .NET, which shares it's namespace in all the .NET languages (C#, VB.NET, Managed C++ and J#)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;If you want to take C#, you will still need to learn the logic and algorithms before using the Windows libraries to make GUIs, otherwise you will be a cookie cutter developer. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Go to microsoft.com and get the Visual Studio Express version, they are FREE and come with tutorials.&lt;br&gt;Reply:Just FYI, C# and C are nothing alike.&lt;br&gt;Reply:Learn C first. Some may argue "learn C# first, it's easier", but in reality C# is very similar to C++, which is based on C. If you want to be any kind of efficient programmer in C++ or C# you should learn C. Then learning C++ after that is a breeze, and then learn C#, which if you know C++ is really just a matter of slight syntax changes and learning all the .NET System namespace. Also, once you learn the .NET stuff, you give yourself a huge boost into other languages that use the .NET library, such as C++ in .NET, VB.NET, etc.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-7505847521175325161?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/7505847521175325161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/i-have-to-make-big-decission-it-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/7505847521175325161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/7505847521175325161'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/i-have-to-make-big-decission-it-is.html' title='I have to make a big decission! It is Microsoft C# or Linux C! I know just a little bit about c#!?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-4046762573978597623</id><published>2009-07-14T22:07:00.000-07:00</published><updated>2009-07-14T22:07:01.680-07:00</updated><title type='text'>How to draw a circle in c++?</title><content type='html'>i want to draw a simple cirlce in c++. dont send me the sample file present in help.just explain me the syntax of circle()function in graphics.h&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;How to draw a circle in c++?&lt;br&gt;The syntax is:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void circle(int x, int y, int radius);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;x/y specify the coordinates of the centre.  Radius is the distance from the centre to circle's edge.&lt;br&gt;Reply:what is c++?? if it is cad, or autocad program then there is an icon to select then specifiy the radius, or diamiter in paranthasis.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://1song-titles.blogspot.com/&gt;song titles&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-4046762573978597623?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/4046762573978597623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-to-draw-circle-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4046762573978597623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4046762573978597623'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-to-draw-circle-in-c.html' title='How to draw a circle in c++?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-8692777999431412910</id><published>2009-07-14T22:06:00.002-07:00</published><updated>2009-07-14T22:06:46.442-07:00</updated><title type='text'>Simple C++ assembly?</title><content type='html'>I'm using Visual C++.  I try this inline code:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;__asm{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  movl %esp,%eax&lt;br&gt;&lt;br /&gt;&lt;br /&gt;     };&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;and I get this error:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;inline assembler syntax error in 'opcode'; found 'MOD'&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;How do I fix this?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Simple C++ assembly?&lt;br&gt;Try this&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;__asm{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;mov esp,eax&lt;br&gt;&lt;br /&gt;&lt;br /&gt;};&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;It Compiles.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I am not into inline assembly for long. I am sorry if I have misguided you.&lt;br&gt;Reply:Or else you may contact an assembly expert. Check websites like http://askexpert.info/&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-8692777999431412910?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/8692777999431412910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/simple-c-assembly.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8692777999431412910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8692777999431412910'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/simple-c-assembly.html' title='Simple C++ assembly?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-4329977769556491002</id><published>2009-07-14T22:06:00.001-07:00</published><updated>2009-07-14T22:06:29.511-07:00</updated><title type='text'>For C++ programmers ONLY?</title><content type='html'>I have created a small program that is all about "Banking Systems". &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I want my user to print all important data using a printer. How will I do this using C++? I am using the Turbo C++ 4.5 compiler.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;If you knew any website that is related to my question, please post its address but if you know the codes, just please write the most-important syntax or semantics that is responsible for printing. I am not encouraging you to write the entire code, just a piece of code or module that is basically the most important code for printing.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Thanks in advance&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;PS: The first answerer to answer my question correctly will gain 10 points + 5 stars + thumbs-up.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;For C++ programmers ONLY?&lt;br&gt;I think that the proper way of doing that under TurboC++ was to open an output "file" with the name of  "LPT1:" or "COM1:" or wherever your printer is attached. You can then use any file output methods like fprintf(...)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;If I am remembering too far back for TurboC++ 4.5, then sorry and never mind.&lt;br&gt;Reply:Thank you very much sir. Sorry that I forgot to reward the best answerer because of my hectic schedule. Unfortunately, I supposed to choose "cod" as the best answerer because the codes work and the site really helps me a lot but your answer is also helpful. Thank you very much and God bless!                          &lt;span&gt;Report It&lt;/span&gt;&lt;br /&gt;                      &lt;br&gt;Reply:If you work under Windows (and not on DOS) you can print the document through the API&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt; OpenPrinter&lt;br&gt;&lt;br /&gt;&lt;br /&gt; StartDocPrint ...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;see www.codeproject.com&lt;br&gt;Reply:http://www.bloggerspedia.com/story.php?t...&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-4329977769556491002?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/4329977769556491002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/for-c-programmers-only.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4329977769556491002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4329977769556491002'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/for-c-programmers-only.html' title='For C++ programmers ONLY?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-1860607502843760124</id><published>2009-07-14T22:06:00.000-07:00</published><updated>2009-07-14T22:06:13.691-07:00</updated><title type='text'>How to initialise a 2D array in C++?</title><content type='html'>Hello,&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;How do I initialise a global 2D arary in C++?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;First, I declared the 2D array outside of the main function. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;int data[32][5];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Then in the main function, I initialized the array:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;data[32][5]  =  {{0,0,0,0,0},&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{0,0,0,0,1},{0,0,0,1,0},{0,0,0,1,1},{0...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;......................................... integers here)..........&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{1,1,1,1,1}};&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The above is what I typed into visual c++ 2005. After the comma of every 5th bracket, I pressed 'Enter' to go to a new line.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;However, when I compiled, there were syntax errors saying that there are missing ; before '{' or '}' .&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;What is the syntax error?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;How to initialise a 2D array in C++?&lt;br&gt;is your declaration is correct&lt;br&gt;&lt;br /&gt;&lt;br /&gt;it should be defined as:&lt;br&gt;&lt;br /&gt;&lt;br /&gt; &lt;br&gt;&lt;br /&gt;&lt;br /&gt;public int data[][];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;public int main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;data[32][5]={{.......}{.......}{.........&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-1860607502843760124?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/1860607502843760124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-to-initialise-2d-array-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1860607502843760124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1860607502843760124'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-to-initialise-2d-array-in-c.html' title='How to initialise a 2D array in C++?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-2807649760180105630</id><published>2009-07-14T22:05:00.003-07:00</published><updated>2009-07-14T22:05:57.626-07:00</updated><title type='text'>Which C++ book is good for me?</title><content type='html'>I am a begginer in programming C++ , and I want to buy a book with which I can improve my abilities in programming.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I already know some basic stuff like variables and constans and simple input and output and basic functions, and also loops and if statements and some other very basic things.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I am NOT looking for books which have definitions and just tell me which syntax does what, I actually want a book that has exercises in it and gets me to test my knowledge &lt;br&gt;&lt;br /&gt;&lt;br /&gt;and programming skills in a real way, and gives me a little bit of experience how you should model real time stuff with C++, &lt;br&gt;&lt;br /&gt;&lt;br /&gt;If you have read or you know a book which is good for this purpose, please let me know&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Thank you&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Which C++ book is good for me?&lt;br&gt;C++ Cookbook.  Why not learn from real-world recipes?  This is actually a very helpful book and will remove you from the stone-age from what other books %26amp; tutorials will offer you. I'm not doing any C++ from day to day but I do own the book and found it very helpful in the past.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Also, if you really want to improve your skills learn unit testing.  There is a nice framework for C++ called csUnit.  Unit testing other's code will help you out tremendously.&lt;br&gt;Reply:Complete reference C++&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Auth: Herbert Schield&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Pub: McGrawHill&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;he takes u from the very basic to industry implementation level...&lt;br&gt;Reply:"in the past I bought several beginner to intermidiate books , but all of them give you definitions and examples and told me about different things which do different jobs for example they told me about different loops and how they work and the syntax for each of them and different variables and how each of them works like signed short and signed long and char and bool and a whole bunch of other stuff but they never showed me how a simple program is written and the books didnt have any excercises with answers, and after I read these chapters I douldnt write the most basic stuff, except for simple input and output that you give the computer some numbers and it does some stuff on it and gives it back to you and this is nothing, I wanna learn to USE the loops and functions and if statements and operations that I learned in definition."&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Didn't they teach you in school to AVOID run-on sentences?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;My first advice is to always stay away from Herbert Schildt.  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;My second advice is to give "Ivor Horton's Beginning ANSI C++ - The Complete Language" a try: http://www.amazon.com/dp/1590592271/&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://4song-downloads.blogspot.com/&gt;song downloads&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-2807649760180105630?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/2807649760180105630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/which-c-book-is-good-for-me.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2807649760180105630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2807649760180105630'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/which-c-book-is-good-for-me.html' title='Which C++ book is good for me?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-3127826070980696500</id><published>2009-07-14T22:05:00.002-07:00</published><updated>2009-07-14T22:05:42.270-07:00</updated><title type='text'>Need help understanding a simple C function?</title><content type='html'>Hi, I know java but am new to C. Although I do have the concept of what pointers are but I am not familiar with the syntax. Would somebody please explain the statements that involve the use of asterisks in the following function?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;(Particularly the one that starts with a*)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void allocate_2d_array (int r, int c, double ***a)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   double *storage;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   int     i;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   storage = (double *) malloc (r * c * sizeof(double));&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   *a = (double **) malloc (r * sizeof(double *));&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   for (i = 0; i %26lt; r; i++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;      (*a)[i] = %26amp;storage[i * c];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Thank you very much for your help.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Need help understanding a simple C function?&lt;br&gt;Okay, there are two symbols which are relevant in talking about pointers in C (as an aside, in C++ they are slightly extended so people can get confused.  In particular %26amp; has one other meaning related to addresses).  The two symbols are %26amp; which can be understood as "The Address of" and * which is "Pointer to".&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Thus this function has 3 parameters coming in:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;r: the number of elements in the array&lt;br&gt;&lt;br /&gt;&lt;br /&gt;c: the multiplier&lt;br&gt;&lt;br /&gt;&lt;br /&gt;and a pointer to a pointer to a pointer to a.  Got that?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The first thing which is declared is a pointer to the array storage.  Then we get the counter int, i, but we'll skip over that.  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;All storage is is an area of memory large enough to hold the address of a double (which is large enough to hold a pointer to an array of doubles, because arrays are usually passed as a pointer to the first element).  That's why the storage= line is necessary.  It sets aside a block of memory which is r*c*the size of a double bytes long.  Since it uses malloc() which returns a void * it is necessary to cast the pointer as a double for it to be useable.  That is what the (double *) does.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The next line I can parse better than I can understand.  The an area of memory the size of a double * r is allocated, then cast as a pointer to a pointer, which is assigned to the address which is pointed to by a.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The line after that clarifies it a little, if you understand something called pointer decay.  What this means is that since parameters are passed as values -- that is new variables are created in each function into which the values in the old variables are copied EXCEPT arrays which are passed as pointers to array[0] -- the address of the first element -- pointers to arrays and arrays can be treated exactly the same way.  Each element in the array pointed to by a is assigned the address (the %26amp; operator) of the element in storage at i*c.  Thus *a[0]==%26amp;storage[0], *a[1]==%26amp;storage[c], *a[2]==%26amp;storage[2c]... This is why this helps explain the above.  It's an array of pointers to doubles.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The subject, as you can tell is very gnarly, and I'm pressed for time, I'm sorry to say.  I'll leave you with a link in sources (which I did use) about pointer decay.&lt;br&gt;Reply:*a is a pointer variable. **a is a pointer to pointer. storage is apointer variable here.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;and it has allocated memory dynamically using malloc.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Its syntax to allocate memory is (type of pointer variable)malloc(size).&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-3127826070980696500?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/3127826070980696500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/need-help-understanding-simple-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3127826070980696500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3127826070980696500'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/need-help-understanding-simple-c.html' title='Need help understanding a simple C function?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-6098325220185637153</id><published>2009-07-14T22:05:00.001-07:00</published><updated>2009-07-14T22:05:26.343-07:00</updated><title type='text'>Help with C programming?</title><content type='html'>i am writing a quick sort program for a C programming class and I can't tell what's wrong.  I am getting syntax errors like "[Warning] parameter names(without types in function declaration"  and "previous definition of 'sort_nums' was here."  What do these mean and how do I fix them.  Also I am using recursion if that makes a difference&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Help with C programming?&lt;br&gt;Hard to help you without seeing your source code. Sounds like you may have a problem with mixing up your function **declaration** with your function **defintion(s)**. Review the purpose of each of these things and HOW you do them, and remember that you don't NEED to have a definition at all unless you are calling a function whose DECLARATION is in a different source file or AFTER the call to it. If you do have multiple DEFINITIONs, make sure they are all consistent.&lt;br&gt;Reply:http://www.cprogramming.com/tutorial.htm...   &lt;br&gt;&lt;br /&gt;&lt;br /&gt;This link might have what you want. I'm not too up on my C programming&lt;br&gt;Reply:Now you can call quickSort function ijn your Main Program.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;///////////Function To Call Quick Sort//////////&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void quickSort(int numbers[], int array_size)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  q_sort(numbers, 0, array_size - 1);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;///////////Function To Call Quick Sort//////////&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void q_sort(int numbers[], int left, int right)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  int pivot, l_hold, r_hold;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  l_hold = left;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  r_hold = right;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  pivot = numbers[left];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  while (left %26lt; right)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    while ((numbers[right] %26gt;= pivot) %26amp;%26amp; (left %26lt; right))&lt;br&gt;&lt;br /&gt;&lt;br /&gt;      right--;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    if (left != right)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;      numbers[left] = numbers[right];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;      left++;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    while ((numbers[left] %26lt;= pivot) %26amp;%26amp; (left %26lt; right))&lt;br&gt;&lt;br /&gt;&lt;br /&gt;      left++;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    if (left != right)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;      numbers[right] = numbers[left];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;      right--;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  numbers[left] = pivot;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  pivot = left;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  left = l_hold;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  right = r_hold;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  if (left %26lt; pivot)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    q_sort(numbers, left, pivot-1);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  if (right %26gt; pivot)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    q_sort(numbers, pivot+1, right);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-6098325220185637153?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/6098325220185637153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/help-with-c-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6098325220185637153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6098325220185637153'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/help-with-c-programming.html' title='Help with C programming?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-807057347086370848</id><published>2009-07-14T22:05:00.000-07:00</published><updated>2009-07-14T22:05:10.107-07:00</updated><title type='text'>C code problem?</title><content type='html'>#include%26lt;stdio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  int calsum(int x,int y, int z);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  int a,b,c, sum;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  printf("\n Enter any three numbers");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  scanf("%d %d %d",%26amp;a, %26amp;b, %26amp;c);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  sum = calsum(a,b,c);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  printf("\nSum=%d",sum);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  int calsum(int x,int y,int z)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   int x,y,z,;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  int d;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  d=x+y+z;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  return (d);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;error messages is&lt;br&gt;&lt;br /&gt;&lt;br /&gt; function should return a value in function main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;declaration syntax error&lt;br&gt;&lt;br /&gt;&lt;br /&gt;deceleration terminated incorrectly&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Plz tell me where I am wrong&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;C code problem?&lt;br&gt;#include%26lt;stdio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int calsum(int x,int y, int z); **** write int calsum(int, int, int);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int a,b,c, sum;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;printf("\n Enter any three numbers");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;scanf("%d %d %d",%26amp;a, %26amp;b, %26amp;c);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;sum = calsum(a,b,c);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;printf("\nSum=%d",sum);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int calsum(int x,int y,int z)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int x,y,z,;  ****remove this&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int d;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;d=x+y+z;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;return (d); ***use return d;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Please try then tell me if u still encounter error&lt;br&gt;Reply:main() should be void main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;replace the main()  by void main()&lt;br&gt;Reply:return 0;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;in main&lt;br&gt;Reply:The main method returns an integer value by default. Since in your code, no value is returned by the main(), the error occurs.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;You may either choose to define main as &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;// your code goes here&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;or,&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;// your code&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;return 0;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;Reply:type return 0; in the last line in the main program. surely this will solve this problem&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-807057347086370848?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/807057347086370848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-code-problem.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/807057347086370848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/807057347086370848'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-code-problem.html' title='C code problem?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-8665976307156708667</id><published>2009-07-14T22:04:00.003-07:00</published><updated>2009-07-14T22:04:53.606-07:00</updated><title type='text'>C# Questions - Please Help ASAP!?</title><content type='html'>i am having some difficulty with these C# questions! i will give you the questions and 4 possible answers, please can you provide me with the correct answer and please explain how you got that answer.... thanks in advance&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;1. What does the following algorithm produce when n is 3?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;set sum to 10.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;set i to 1.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;input n.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;while i is less than or equal to n do&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    take i from sum.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    increment i.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;output sum.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;a. 9&lt;br&gt;&lt;br /&gt;&lt;br /&gt;b. 7&lt;br&gt;&lt;br /&gt;&lt;br /&gt;c. 4&lt;br&gt;&lt;br /&gt;&lt;br /&gt;d. 1&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;2. What would be output by the following section of code ?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int A[4] = {1 , 2, 3, 4};&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int i;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;for (i=0; i%26lt;4; i++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt; {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  A[i] = A[i] + A[i];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Console.WriteLine (A[i] );&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;a. 4&lt;br&gt;&lt;br /&gt;&lt;br /&gt;b. 0&lt;br&gt;&lt;br /&gt;&lt;br /&gt;c. 8&lt;br&gt;&lt;br /&gt;&lt;br /&gt;d. 6&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;3. Given the following method (you may assume it has all compiled correctly so there are no syntax errors), what will be output?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;public static void printloop()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int i;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;for (i=1; i%26lt;9; i++) ;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;if (i%2 = = 0) ;&lt;br&gt;&lt;br /&gt;&lt;br /&gt; Console.WriteLine (i + " ");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;a. 2 4 6 8&lt;br&gt;&lt;br /&gt;&lt;br /&gt;b. 8&lt;br&gt;&lt;br /&gt;&lt;br /&gt;c. Nothing is output.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;d. 2 4 6&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;C# Questions - Please Help ASAP!?&lt;br&gt;First problem the answer is 4.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Second problem the answer is 8&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Third problem the answer is 2, 4, 6, 8.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Why?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;1st Problem:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;sum 10&lt;br&gt;&lt;br /&gt;&lt;br /&gt;i 1&lt;br&gt;&lt;br /&gt;&lt;br /&gt;n 3&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;while i%26lt;=n &lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;sum = sum -1 &lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;output sum&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;10 - 6 = 4, thats the output of sum&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Second problem:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;You end up having the value of 4+4 which is 8.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;And for the last problem, the only numbers that will give you %2==0 are 2, 4, 6, 8&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://sending-flowers2.blogspot.com/&gt;sending flowers&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-8665976307156708667?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/8665976307156708667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-questions-please-help-asap.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8665976307156708667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8665976307156708667'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-questions-please-help-asap.html' title='C# Questions - Please Help ASAP!?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-8274724339451297900</id><published>2009-07-14T22:04:00.002-07:00</published><updated>2009-07-14T22:04:37.381-07:00</updated><title type='text'>C++ problem....?</title><content type='html'>I have this C++ program but when I try to compile it,it says "error C2143: syntax error : missing ';' before '}'"&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;iostream%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;using namespace std;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int x = 7;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout%26lt;%26lt;"try to figure out where are the errors !!!"%26lt;%26lt;endl;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout%26lt;%26lt;x%26lt;%26lt;endl;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;//this is a comment&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout%26lt;%26lt;"bye bye";&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout%26lt;%26lt;"don't forget to solve errors"&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;what am I doing wrong ?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;C++ problem....?&lt;br&gt;Add a semicolon ";" to the end of last line i.e. before the "}" and then recompile.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout%26lt;%26lt;"don't forget to solve errors";&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Hope it helps :)&lt;br&gt;Reply:cout%26lt;%26lt;"don't forget to solve errors"&lt;br&gt;&lt;br /&gt;&lt;br /&gt;semicolon is missing there at the end . :)&lt;br&gt;Reply:You are missing a ";" after cout%26lt;%26lt;"don't forget to solve errors"&lt;br&gt;Reply:Put a ; after cout%26lt;%26lt;"don't forget to solve errors"&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-8274724339451297900?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/8274724339451297900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-problem.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8274724339451297900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8274724339451297900'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-problem.html' title='C++ problem....?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-3128486041578068235</id><published>2009-07-14T22:04:00.001-07:00</published><updated>2009-07-14T22:04:22.091-07:00</updated><title type='text'>Is there anyone out there, who is experienced with C#, willing to teach it?</title><content type='html'>I need to learn networking/server developement mostly, but I'd love to know how to do more with C#. I've got a good logic with it, but the syntax holds me back.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Is there anyone out there, who is experienced with C#, willing to teach it?&lt;br&gt;That's a large time commitment you're asking for.  Why don't you just do what I did -- read some examples, test some things out, read the specification, and start coding?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Ayny particular questions you have you can ask (for example) here, but everything all at once is a little much.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-3128486041578068235?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/3128486041578068235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/is-there-anyone-out-there-who-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3128486041578068235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3128486041578068235'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/is-there-anyone-out-there-who-is.html' title='Is there anyone out there, who is experienced with C#, willing to teach it?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-2103247420890209328</id><published>2009-07-14T22:04:00.000-07:00</published><updated>2009-07-14T22:04:06.514-07:00</updated><title type='text'>What is difference between "member selection" (.) and "pointer to member" (-&gt;) in C++?</title><content type='html'>This is a very basic C++ question, but help is appreciated.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I'm an experianced VB.net programmer, and want to quickly learn C++.  The biggest hurdle at the moment is finding the new syntax and understanding unmanaged pointers - I already understand OOP very well.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Could anyone explain simply what the "pointer to member" operator really is doing? I'm used to only using member selection.  Why is a different symbol needed?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;What is difference between "member selection" (.) and "pointer to member" (-%26gt;) in C++?&lt;br&gt;Pointers are one of the most confusing concepts for some people.  Not everyone.  Just some people.  So here is a description of pointers to make sure you get it.  It is central to this entire discussion.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;You should also know about the %26amp; operand which is used to get the address of something.  To get the address of i, you would write %26amp;i.  As in:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int i = 10;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int * p = %26amp;i;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;now p contains the address of i.  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;A pointer is a variable that contains an address to memory somewhere on the computer. Let's say i is an integer with a value of 10.  That integer lives somewhere in the computer RAM.  Lets say it lives at address 5555.  If we have a pointer p that points to that integer, then p has a value of 5555.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Great, let's go on.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Let's say there is a structure or class containing an integer i.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;so i, is a member of our class.  If an instance of that class exists somewhere it has an address. The same address and pointer discussion from before applies.  p = 5555, which is the address of the object(instance of class).  So we say p points to the object.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;This might look like this:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;MyClass o = MyClass(); //create object o&lt;br&gt;&lt;br /&gt;&lt;br /&gt;MyClass *p = %26amp;o; //get the address of o&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Now we want to access the member i of that class.  I would put p-%26gt;i to get that value because p is a pointer to the object that contains the member item I want.  At any time, you can change p to make it point to some other object.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Member selection using "." is like the original integer discussion using i.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;In the original discussion, i was the actual integer.  In the same way, if the object is o, then o.i is the member i of object o.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;In the example above, p-%26gt;i is refers to the same value as o.i;&lt;br&gt;Reply:Their is a difference, if the . operator is used, then the memory address that is manipulated is the address of the object being accessed plus the offset where the data is stored.  If the -%26gt; operator is used, then the value of the pointer plus the offset is used to access the correct memory location.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Also, in C++ we can overload operators, including -%26gt;, which can allow for some interesting syntax.&lt;br&gt;Reply:Pointer to member operator (--%26gt;)will call the methods or members at runtime(dynamically). In C++ we have virtual functions . To call those functions we use pointer to member.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Where as we use member selection where call class members at compile time.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-2103247420890209328?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/2103247420890209328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-difference-between-member.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2103247420890209328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2103247420890209328'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-difference-between-member.html' title='What is difference between &quot;member selection&quot; (.) and &quot;pointer to member&quot; (-&amp;gt;) in C++?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-9222868685013031091</id><published>2009-07-14T22:03:00.002-07:00</published><updated>2009-07-14T22:03:49.617-07:00</updated><title type='text'>USER LOGIN function in VB.NET (Code Syntax?)?</title><content type='html'>Hi all, I need help here  =/&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I need to develop a web based application based on:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;- Microsoft's ASP.NET 2.0&lt;br&gt;&lt;br /&gt;&lt;br /&gt;- SQL Server 2005 &lt;br&gt;&lt;br /&gt;&lt;br /&gt;- Programming language is VB.Net&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Programs I used are:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;- Visual Web Developer 2005 Express Edition&lt;br&gt;&lt;br /&gt;&lt;br /&gt;- Microsoft SQL Server Management Studio&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Currently I need to do the LOGIN FUNCTION for the user but im not sure how to start. I studied C# in school but my internship company (currently) required me to code in VB.Net and for that I find it very confusing. &lt;br&gt;&lt;br /&gt;&lt;br /&gt; &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Description of what I have: &lt;br&gt;&lt;br /&gt;&lt;br /&gt;The main page has a UserID and Password.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;- 2 textboxes (and 2 Required Field Validator)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;- 1 Login button&lt;br&gt;&lt;br /&gt;&lt;br /&gt;- 1 label for Login Error (A login message will be shown if user failed to log in)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;- Forget Password Link &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The database has a table named User:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;- Fields are UserID, Password, .............&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;*Note* User do not have to register. There is no registration form.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I would like to know how the code syntax is like in VB.NET?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Thanks!&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;USER LOGIN function in VB.NET (Code Syntax?)?&lt;br&gt;IMHO, your C# background is awesome and you shouldn't use that as an excuse now.  You can do it.  Take heart that VB.NET and Visual C#.NET are not really worlds apart since they share the same Base Class Library.  Believe it or not, it will be easier for you to learn VB.NET with your C# background than it is for most VB6 developers to transition to VB.NET!&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Here's an excellent .NET developers' website that may have some clues for you: http://www.codeproject.com/info/search.a...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Having said that, most of those articles deal with complex forms authentication and role-based security, which is probably beyond what you need.  You simply need to validate the user credentials against the db and then allow access (redirect, most likely) to other pages or not.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Let me ask you this: Do you have a good idea how you'd accomplish this in C#?  If so, you may want to write out and post some C# pseudocode snippets and see if people can help you translate it to VB.NET.  If nothing else, it will help you organize your thoughts.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://4send-flowers.blogspot.com/&gt;send flowers&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-9222868685013031091?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/9222868685013031091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/user-login-function-in-vbnet-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/9222868685013031091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/9222868685013031091'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/user-login-function-in-vbnet-code.html' title='USER LOGIN function in VB.NET (Code Syntax?)?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-2711617745237338408</id><published>2009-07-14T22:03:00.001-07:00</published><updated>2009-07-14T22:03:33.403-07:00</updated><title type='text'>C Programming Homework?</title><content type='html'>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.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I hope somebody could help me answer at least one question. Many many thanks. :)&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;C Programming Homework?&lt;br&gt;1. It's uninitialized memory or so called dangling pointers. But the most dangerous is buffer overflow.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;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&lt;br&gt;&lt;br /&gt;&lt;br /&gt;for(i = 0; i %26lt;= LENGTH; i++) { ... }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;3. I'm not quite sure if i understand the question but let's try&lt;br&gt;&lt;br /&gt;&lt;br /&gt;* - it can dereference pointer or it's multiplication - it depends on the tokens used.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;%26amp; - get the address of the variable.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;++ - pretty much inc instruction in the asm. So (i++) == (i = i + 1)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;-- - same as ++ but for subtraction.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;| - bitwise or&lt;br&gt;&lt;br /&gt;&lt;br /&gt;%26amp; - bitwise and&lt;br&gt;&lt;br /&gt;&lt;br /&gt;|| - logical or&lt;br&gt;&lt;br /&gt;&lt;br /&gt;%26amp;%26amp; - logical and&lt;br&gt;&lt;br /&gt;&lt;br /&gt;and many others like %26gt;%26gt; %26lt;%26lt; and so on ...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;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 :)&lt;br&gt;Reply:1. The person has no clue what they are doing.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;2. Syntax - No real answer. Thats like entering into a calculator: 3.3456.5.3 * 2.&lt;br&gt;Reply:1. not meeting requirements&lt;br&gt;&lt;br /&gt;&lt;br /&gt;2. syntax errors are compiler driven while logical errors are defects of logic.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;4. Visual basic allows you to implement object-oriented methodology (includes object definition etc..)&lt;br&gt;Reply:1. Bad programming, not knowing whta you are doing.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;2. Syntax errors won't compile, logical errors will, but produce results that aren't what you are expecting.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;3. Another post will have these.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;4. C is older, not visual.  Visual Basic isn't as powerful, but is easier and more popular in industry.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-2711617745237338408?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/2711617745237338408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-programming-homework.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2711617745237338408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2711617745237338408'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-programming-homework.html' title='C Programming Homework?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-5801689561120335604</id><published>2009-07-14T22:03:00.000-07:00</published><updated>2009-07-14T22:03:29.456-07:00</updated><title type='text'>What is the BNF and syntax form of this problem?</title><content type='html'>Determine the BNF and syntax form of adding the first and second digit, multiplying it's sum to the third digit, getting it's qoutient from dividing the product to the 4 digit and subtracting the qoutient to the 5 digit. and getting the form of c=a2=b2/d. thanks.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;What is the BNF and syntax form of this problem?&lt;br&gt;abcde&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;(a+b)*c\d - e&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-5801689561120335604?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/5801689561120335604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-bnf-and-syntax-form-of-this.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/5801689561120335604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/5801689561120335604'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-bnf-and-syntax-form-of-this.html' title='What is the BNF and syntax form of this problem?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-1885998107824438141</id><published>2009-07-14T22:02:00.002-07:00</published><updated>2009-07-14T22:02:45.705-07:00</updated><title type='text'>What is the proper syntax for commands in the RUN dialog box for Windows?</title><content type='html'>I keep trying different commands, but for each command, the command window just opens up for less than a second, then closes. Why does it do this, or what am I typing wrong in the dialog box? Here's an example:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cmd [/c] [/t:fg] &lt;br&gt;&lt;br /&gt;&lt;br /&gt;this command is supposed to change the foreground and background colors for the command window, but I keep getting the message:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Not recognized as internal or external command, operable program or batch file.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;How can I use the command function properly with the correct syntax?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;What is the proper syntax for commands in the RUN dialog box for Windows?&lt;br&gt;If you're trying to open a command window and have it look a certain way, then you'll definitely have to change the syntax a bit.  So, let's look at what you're doing first.  I'm going to assume that the command line you've given us is literally what you're typing in the 'run' box.  Let's break it down a bit,&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;1) cmd&lt;br&gt;&lt;br /&gt;&lt;br /&gt;If you enter this by itself, does a DOS command window open?  If not, then you have some other issues.  But for the sake of this question, I'll assume it works.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;2) cmd [/C] [/T:fg]&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Get rid of any and all square brackets [  ] .. those are used on the help screen to delimit the start and stop of the different command line options.  They are not meant to be typed in.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;3) cmd /C&lt;br&gt;&lt;br /&gt;&lt;br /&gt;This will execute whatever you want in a DOS command window, then immediately close the command window.  That's why it's disappearing so quickly.  If you want the DOS window to stay open then use,&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cmd /K&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;4) /T:fg&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The 'fg' are placeholder variables.  'f' means Foregroud, and 'g' means backGround.  But 'fg' is not supposed to be typed in,  it's just meant to show that there are two variables and their order.  To actually use the /T option, then you'll need to look at the options on the COLOR command, use COLOR /? to see those.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;So, for instance, if you wanted a blue background with white text, then you would enter&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cmd /T:17&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;5) One last quirk, if you put the command and options in this order, you'll get an error.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cmd /K /T:17&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The command options need to be switched around for this.  I don't know why, has to do with how DOS processes the ":" symbol as a label or part of a drive name, or some such nonsense.  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;So the correct command with options to create a non-closing DOS window with a blue background and white text is:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cmd /T:17 /K&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Finally) if you want your chosen colors to be persistent any time you open a dos window without have to type all those command options, then open a window with just&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cmd&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;then, right click on the title bar of the DOS window and select "Properties".  Make all the changes you want to many aspects of a DOS box, including background/font color, size, fonts, layout, etc.  When you click "OK" to save, then you'll be prompted to save the properties .. choose "Save properties for future windows with the same title."&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Hope this helps!&lt;br&gt;Reply:I think the run box is just for running programs, particularly older programs that operated only on a command line operating system like DOS. So commands like:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;"C:\Program Files\Adobe\photoshop 5.0\Photoshp.exe" work OK.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;What you are trying to do will probably work in command prompt which comes in accessories in the program section of windows XP (I think it is in other older windows systems too) and is a DOS emulator.&lt;br&gt;Reply:Type cmd /? and it will give you the syntax and options.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-1885998107824438141?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/1885998107824438141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-proper-syntax-for-commands-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1885998107824438141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1885998107824438141'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-proper-syntax-for-commands-in.html' title='What is the proper syntax for commands in the RUN dialog box for Windows?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-6600073843245079258</id><published>2009-07-14T22:02:00.001-07:00</published><updated>2009-07-14T22:02:29.999-07:00</updated><title type='text'>When i include iostream.h in my c++ program i get errors. what should i do?</title><content type='html'>error is C:\TC\INCLUDE\IOSTREAM.H 38:declaration syntax error&lt;br&gt;&lt;br /&gt;&lt;br /&gt;i include the file like  #include%26lt;iostream.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;my turbo c++ version is 1.01&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;When i include iostream.h in my c++ program i get errors. what should i do?&lt;br&gt;maybe... u didn't put any space between include and %26lt;iostream%26gt;...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;example:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;iostream.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;hope this will help you...&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://1quince.blogspot.com/&gt;quince&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-6600073843245079258?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/6600073843245079258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/when-i-include-iostreamh-in-my-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6600073843245079258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6600073843245079258'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/when-i-include-iostreamh-in-my-c.html' title='When i include iostream.h in my c++ program i get errors. what should i do?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-3454455446324157780</id><published>2009-07-14T22:02:00.000-07:00</published><updated>2009-07-14T22:02:13.704-07:00</updated><title type='text'>How to make a program in C++(turbo c++) that can do addition with the given of two integers?</title><content type='html'>how to make a program in C++(turbo c++) that can do addition with the given of two integers?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I know this is odd but i just want to know how?what if I want to compute 3 integers or 4? How do I do it?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;by the way I'm a beginner. Plese don't tell me to find it in the internet because I've already did it. the syntax is different because were using a very old turbo c++ compiler (v1.01)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;post the program here...thanks&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;How to make a program in C++(turbo c++) that can do addition with the given of two integers?&lt;br&gt;#include%26lt;iostream%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;using namespace std;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int main(int argc, char **argv)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int a,b,c,i;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int g=2;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;c=0;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;for (i = 0; i%26lt;g; i++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout %26lt;%26lt; "get number";&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cin   %26gt;%26gt; a;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;c = c+a;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout %26lt;%26lt; "number is " %26lt;%26lt; c;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;just change the number 2 with the number of integets you want to add&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-3454455446324157780?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/3454455446324157780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-to-make-program-in-cturbo-c-that.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3454455446324157780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3454455446324157780'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-to-make-program-in-cturbo-c-that.html' title='How to make a program in C++(turbo c++) that can do addition with the given of two integers?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-2593747797428093558</id><published>2009-07-14T22:01:00.003-07:00</published><updated>2009-07-14T22:01:57.664-07:00</updated><title type='text'>What the proper syntax to delete Norton Goback completely using either command console or command prompt?</title><content type='html'>I have 160 gigabyte internal hard drive, I was using for logical storage. Ever since I stored Goback on it,  my primary c drive could no longer read it as a storage drive.  It is like the 160 gigabyte hard drive is useless.  Even when I try it in other machines it is not recognized. Goback tries to start, but then I get an error message saying there is no operating system to start Goback.  I’m not able to install the operating system unless I can get this hard disk changed to primary. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;There is over 40 unused gigabytes (on  this 160 gigabyte internal hard drive) for which an operating system could be loaded if I could partition the hard drive.  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;So I purchased Norton PartitionMagic to do the partition.  Norton PartitionMagic&lt;br&gt;&lt;br /&gt;&lt;br /&gt;says I cannot make any changes to my partition because GoBack is detected.  It says to disable Goback then restart PartitionMagic.  If there were an operating system installed on this disk I could disable Goback. Goback tries to start. Then the error message says “operating system not found” &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;What the proper syntax to delete Norton Goback completely using either command console or command prompt? I believe if I could delete GoBack, then I could work on all my other problems, and get this hard drive partitioned, so I can load and operating system on it. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I’ve never tried to use Norton tech support. I’m sure they are closed now, but are they helpful?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;What the proper syntax to delete Norton Goback completely using either command console or command prompt?&lt;br&gt;There is an easer way to Totally remove Goback form your Master Boot Record (MBR). &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;As your machine is rebooting, hold down "CTRL" and "ALT" don't let go. Press "G" key count to 10, release, then hold again the "G" key, count to 10 release, hold again, count to 10, release. It takes about 3 reboots. Finally you will get the screen you are waiting for. It warns you are about to remove Goback form your MBR. It says press any key to cancel, or press "F" to totally remove Goback form your from your MBR.&lt;br&gt;Reply:If you intend to format, use the gold old fdisk, It does not know or care what is on the partition before deleating it&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-2593747797428093558?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/2593747797428093558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-proper-syntax-to-delete-norton.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2593747797428093558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2593747797428093558'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-proper-syntax-to-delete-norton.html' title='What the proper syntax to delete Norton Goback completely using either command console or command prompt?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-1296466528028974968</id><published>2009-07-14T22:01:00.002-07:00</published><updated>2009-07-14T22:01:41.623-07:00</updated><title type='text'>XML - XPath syntax help?</title><content type='html'>Say you have an XML file that looks like this:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;%26lt;KW%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        %26lt;Subjects SubjectID="00100" SubjectDescription="ABORTION"/%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        %26lt;Subjects SubjectID="00010" SubjectDescription="ABUSE * ADULT * INVESTIGATION"/%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        %26lt;Subjects SubjectID="06450" SubjectDescription="ABUSE * CHILD ABUSE * COUNSELING"/%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;%26lt;/KW%26gt;  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I'm trying to configure the XPath property of a C# XMLDataSource object so that I can grab the rows in this XML file for which the SubjectDescription contains a given search criteria.  For example, if the criteria were "ABUSE", the last two rows of the XML would be returned as a result set.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;What exact XPath syntax would perform this query?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;XML - XPath syntax help?&lt;br&gt;I am working on something like this to answer but this isn't right yet:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;//KW/Subjects[starts-with(@SubjectDesc...&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-1296466528028974968?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/1296466528028974968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/xml-xpath-syntax-help.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1296466528028974968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1296466528028974968'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/xml-xpath-syntax-help.html' title='XML - XPath syntax help?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-4676054217113817325</id><published>2009-07-14T22:01:00.001-07:00</published><updated>2009-07-14T22:01:25.189-07:00</updated><title type='text'>Turbo c help?</title><content type='html'>in a turbo c program i have typed a program . There is no syntax error but when i try to compile there shows error a message comes (unable to open input file "cos.obj")&lt;br&gt;&lt;br /&gt;&lt;br /&gt;What should do to compile the program sucessfully ?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Turbo c help?&lt;br&gt;Here's some material on Turbo C, not sure if it's going to be much help.  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;http://www.brackeen.com/vga/trouble.html...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Most of my C programming was in a Unix environment were we just wrote programs using the vi editor and compiled them with cc.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://2garden-centre.blogspot.com/&gt;garden centre&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-4676054217113817325?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/4676054217113817325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/turbo-c-help.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4676054217113817325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4676054217113817325'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/turbo-c-help.html' title='Turbo c help?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-3764194032251430807</id><published>2009-07-14T22:01:00.000-07:00</published><updated>2009-07-14T22:01:13.364-07:00</updated><title type='text'>Addition of integers in C++?</title><content type='html'>I am trying to write a program that takes in 5 numbers from a user and then add the numbers to get the sum.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I declared &lt;br&gt;&lt;br /&gt;&lt;br /&gt;int a,b,c,d,e,sum; so that those would be my varibles.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I get all the numbers typed in in the program but the addition part makes no sense.  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;I tried&lt;br&gt;&lt;br /&gt;&lt;br /&gt; %d=%d+%d+%d+%d+%d, %26amp;sum, %26amp;a, %26amp;b, %26amp;c, %26amp;d, %26amp;e;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I get a bunch of errors saying  syntax error found. found 'd' expecting";"&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Your help is greatly appreciated.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Addition of integers in C++?&lt;br&gt;You seem to be mistaking the printf statements of "%d=%d+%d+%d+%d+%d", %26amp;sum, %26amp;a, %26amp;b, %26amp;c, %26amp;d, %26amp;e being valid for if and for statements, etc.  The printf statements only work with printf.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Similar to your other question, you only need to use the variables themselves.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;sum = a + b + c + d + e;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;You will probably only want to display the sum, so use&lt;br&gt;&lt;br /&gt;&lt;br /&gt;printf( "%d", sum);&lt;br&gt;Reply:What are you using to comile? Visual studio or? Try www.programmersheaven.com for some help.&lt;br&gt;Reply:what is this % sign for? %26amp; sign means the address of a variable in memory.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;here is what you may want:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int a,b,c,d,e,sum;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;// the part which takes in 5 numbers&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;sum=a+b+c+d+e;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;// print out&lt;br&gt;&lt;br /&gt;&lt;br /&gt;return 0;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;Reply:is that supposed to be a printf?  lose the address refs in your variables.  (get rid of the "%26amp;"s)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;sum = a+b+c+d+e;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;printf("%d = %d + %d + %d + %d + %d", sum, a, b, c, d, e);&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-3764194032251430807?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/3764194032251430807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/addition-of-integers-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3764194032251430807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3764194032251430807'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/addition-of-integers-in-c.html' title='Addition of integers in C++?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-1436346648158750715</id><published>2009-07-14T22:00:00.003-07:00</published><updated>2009-07-14T22:00:54.331-07:00</updated><title type='text'>How to execute c program in gcc compiler under windows OS?</title><content type='html'>I have started to use a gcc compiler (cygwin and mingw) recently. Iam unable to compile and execute programs thorough it. Can somebody tell me where to save the c/c++ files in order to get them compiled and the syntax needed to compile and run them. I would be thankful if someone also provides some links  which could help me to get familiar with the gcc compiler.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;How to execute c program in gcc compiler under windows OS?&lt;br&gt;When installing cygwin it doesnt automatically come with gcc.  You have to tell it to install it.  Its been a while, but basically when you are installing cygwin, you have to hit custom or something and select the packages to install.  There are a lot but somewhere you should find one where you can select gcc, makefile, and whatever else you may need.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;You can then call gcc as normal.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-1436346648158750715?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/1436346648158750715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-to-execute-c-program-in-gcc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1436346648158750715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1436346648158750715'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-to-execute-c-program-in-gcc.html' title='How to execute c program in gcc compiler under windows OS?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-1779483640605539119</id><published>2009-07-14T22:00:00.002-07:00</published><updated>2009-07-14T22:00:38.175-07:00</updated><title type='text'>Are J# (.NET) syntax and library references exactly the same as standard Sun JAVA?</title><content type='html'>I only as because I'm using JSC to compile java files that I've compiled previously with javac, but am getting all sorts of weird error messages about missing ';' and '%26gt;' characters.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;%26lt;code%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;C:\%26gt;jsc JSCTest.java&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Microsoft (R) JScript Compiler version 8.00.50727&lt;br&gt;&lt;br /&gt;&lt;br /&gt;for Microsoft (R) .NET Framework version 2.0.50727&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Copyright (C) Microsoft Corporation 1996-2005. All rights reserved.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;JSCTest.java(5,35) : error JS1193: Expected ',' or ')'&lt;br&gt;&lt;br /&gt;&lt;br /&gt;JSCTest.java(5,40) : error JS1002: Syntax error&lt;br&gt;&lt;br /&gt;&lt;br /&gt;%26lt;/code%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;what am I doing wrong?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Are J# (.NET) syntax and library references exactly the same as standard Sun JAVA?&lt;br&gt;No, J# is not the same as standard Sun Java; problems compiling conformant Java code under J# are not at all uncommon.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;But I don't think that is your problem here. It looks like you are using the JavaScript compiler, not the Java compiler. Java and JavaScript are not the same thing at all!&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;You should download the latest Java developer's kit from http://java.sun.com and use the "javac" command contained therein to compile your Java code.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-1779483640605539119?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/1779483640605539119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/are-j-net-syntax-and-library-references.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1779483640605539119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1779483640605539119'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/are-j-net-syntax-and-library-references.html' title='Are J# (.NET) syntax and library references exactly the same as standard Sun JAVA?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-6638123962303724495</id><published>2009-07-14T22:00:00.001-07:00</published><updated>2009-07-14T22:00:22.150-07:00</updated><title type='text'>How to write an exponetial equation in C code/language?</title><content type='html'>i am trying to define the following funtion in C code could some please tell me the exact syntax on how to declare this&lt;br&gt;&lt;br /&gt;&lt;br /&gt;f(x) = e^(-x^2) &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;this is how someone told me to do it but it doesnt work&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include(math.h)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;y= exp(-x,2)&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;How to write an exponetial equation in C code/language?&lt;br&gt;the function is &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;pow(base, exponent);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;and you DO have to include math.h&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;First define e&lt;br&gt;&lt;br /&gt;&lt;br /&gt;const float e = 2.78; //proabably want to be more exact&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int x;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;x = 10;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;pow(e, pow(x, 2)); //This caluculates e to the value of x (which is 10) squared.&lt;br&gt;Reply:exp(pow(-x,2));&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://2flower-show.blogspot.com/&gt;flower show&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-6638123962303724495?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/6638123962303724495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-to-write-exponetial-equation-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6638123962303724495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6638123962303724495'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-to-write-exponetial-equation-in-c.html' title='How to write an exponetial equation in C code/language?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-8744987364652928119</id><published>2009-07-14T22:00:00.000-07:00</published><updated>2009-07-14T22:00:06.713-07:00</updated><title type='text'>If bluej is for java,what is for C++?</title><content type='html'>I just want to get the answer as fast as I can.,If we use bluej to compile java syntax,what are  we going to use for C++?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;If bluej is for java,what is for C++?&lt;br&gt;Not quite sure, but look up Poseidon.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Also, look up Bloodshed Dev C++ and Eclipse with the C++ plug-in.&lt;br&gt;Reply:bluej supports C\C++.&lt;br&gt;Reply:Microsoft Visual C++ Express Edition, it's free and seems to have quite a few features.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;http://msdn.microsoft.com/vstudio/expres...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Good luck with your c++ programming!&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-8744987364652928119?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/8744987364652928119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/if-bluej-is-for-javawhat-is-for-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8744987364652928119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8744987364652928119'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/if-bluej-is-for-javawhat-is-for-c.html' title='If bluej is for java,what is for C++?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-2572999289480488090</id><published>2009-07-14T21:59:00.002-07:00</published><updated>2009-07-14T21:59:50.403-07:00</updated><title type='text'>What is the new syntax of "clrscr()"?</title><content type='html'>What is the new or the latest syntax of clrscr()? For example, when I use it in Dev-C++? Or according to Walter Savitch's Second Edition Book? Give as many as you can... thank you very much....&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;What is the new syntax of "clrscr()"?&lt;br&gt;Windows&lt;br&gt;&lt;br /&gt;&lt;br /&gt;system("cls");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Unix &lt;br&gt;&lt;br /&gt;&lt;br /&gt;system("clear");&lt;br&gt;Reply:Since clrscr(), which is part of conio.h, is a non-standard C or C++ function, you'll have to look up how Borland has it implemented. As I recall, it's nothing more than clrscr() by itself.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-2572999289480488090?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/2572999289480488090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-new-syntax-of-clrscr.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2572999289480488090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2572999289480488090'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-new-syntax-of-clrscr.html' title='What is the new syntax of &quot;clrscr()&quot;?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-3470831818608577858</id><published>2009-07-14T21:59:00.001-07:00</published><updated>2009-07-14T21:59:35.524-07:00</updated><title type='text'>How to write DllImport kernel32 in C++.net unmanaged code?</title><content type='html'>Can someone tell me syntax for importing SetEnvironmentVariable from kernel32.dll in C++ unmanaged code.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;How to write DllImport kernel32 in C++.net unmanaged code?&lt;br&gt;check out http://www.pscode.com - site with good examples&lt;br&gt;Reply:Wow...I have no clue what you're talking about.  LOL.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-3470831818608577858?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/3470831818608577858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-to-write-dllimport-kernel32-in-cnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3470831818608577858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3470831818608577858'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-to-write-dllimport-kernel32-in-cnet.html' title='How to write DllImport kernel32 in C++.net unmanaged code?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-7727882553355661167</id><published>2009-07-14T21:59:00.000-07:00</published><updated>2009-07-14T21:59:19.226-07:00</updated><title type='text'>Is there a commond for give a printout commond in DOS mode C language?</title><content type='html'>i make a project for printing the bill of medicins and i want to give a commond to this. what is the commond. please send with the syntax. the whole program in DOS mode C lanuage i.e; C using graphics.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Is there a commond for give a printout commond in DOS mode C language?&lt;br&gt;Research fprint()&lt;br&gt;Reply:i think freopen()  can help u.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;use it to print the file.&lt;br&gt;Reply:printf();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Use this command&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://phone-cards4.blogspot.com/&gt;phone cards&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-7727882553355661167?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/7727882553355661167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/is-there-commond-for-give-printout.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/7727882553355661167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/7727882553355661167'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/is-there-commond-for-give-printout.html' title='Is there a commond for give a printout commond in DOS mode C language?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-5310260670411948078</id><published>2009-07-12T22:53:00.003-07:00</published><updated>2009-07-12T22:53:45.068-07:00</updated><title type='text'>I want to read a c++ source code and then read the output of it from visual C++ 2005.?</title><content type='html'>I dont know the syntax for reading the output of the C++ code. Please help me.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;I want to read a c++ source code and then read the output of it from visual C++ 2005.?&lt;br&gt;Find it from stroustrup's C++ book. Alternaively consult a C++ expert.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-5310260670411948078?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/5310260670411948078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/i-want-to-read-c-source-code-and-then.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/5310260670411948078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/5310260670411948078'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/i-want-to-read-c-source-code-and-then.html' title='I want to read a c++ source code and then read the output of it from visual C++ 2005.?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-4109008432629624255</id><published>2009-07-12T22:53:00.002-07:00</published><updated>2009-07-12T22:53:28.666-07:00</updated><title type='text'>MySQL 'INTO OUTFILE' path syntax in Windows?</title><content type='html'>When I am querying like:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;SELECT * FROM table1 WHERE name LIKE '%some%' INTO OUTFILE 'C:\\bun.xls';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;from a remote computer the output file: 'bun.xls' is saved in the server, and not in the local C of the remote computer. Why? Is it really like this? &lt;br&gt;&lt;br /&gt;&lt;br /&gt;What should I do in order to save/download the table data from the server to local C of the remote computer? Is there a correct syntax for path in Windows like the proper way to use // or the \ or /'s?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;IIf the file already exists, how can I overwrite it? Can I also append data to the existing file? How?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;O my God, I'm asking too much.... sorry. Pls help...&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;MySQL 'INTO OUTFILE' path syntax in Windows?&lt;br&gt;I don't know? Are you sure you can forcibly transfer a file into someone's computer?... Maybe you need to escape your slashes...? =S&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-4109008432629624255?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/4109008432629624255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/mysql-into-outfile-path-syntax-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4109008432629624255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4109008432629624255'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/mysql-into-outfile-path-syntax-in.html' title='MySQL &apos;INTO OUTFILE&apos; path syntax in Windows?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-1086814826828653667</id><published>2009-07-12T22:53:00.001-07:00</published><updated>2009-07-12T22:53:12.419-07:00</updated><title type='text'>Can someone explain to me the function strxfrm() in C++?</title><content type='html'>I am a beginner in C++ but would like to know the syntax, explanation, simple sample program and expected output in using strxfrm() in C++. Please explain it to me very briefly since I am just a beginner.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Can someone explain to me the function strxfrm() in C++?&lt;br&gt;strxfrm() &lt;br&gt;&lt;br /&gt;&lt;br /&gt;transform string &lt;br&gt;&lt;br /&gt;&lt;br /&gt; Function &lt;br&gt;&lt;br /&gt;&lt;br /&gt; SYNOPSIS DESCRIPTION PARAMETERS RETURN VALUES CONFORMANCE MULTITHREAD SAFETY LEVEL PORTING ISSUES AVAILABILITY SEE ALSO  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;SYNOPSIS&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;string.h%26gt; &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;size_t strxfrm(char *s1, const char *s2, size_t n); &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;DESCRIPTION&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The strxfrm() function transforms the string pointed to by s2 so that strcmp() can be used for lexical comparisons, taking into consideration the value of LC_COLLATE. The transformations performed by strxfrm() are such that, if two strings are transformed, the lexical relationship of the transformed strings as determined by strcmp() is the same as the lexical relationship of the original strings as determined by strcoll(). The transformed string is placed into the buffer pointed to by s1. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;If n is zero, then s1 may be null. In this case, strxfrm() returns the number of characters in s2 it would transform. The terminating null-character is not included. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;For the C locale, strxfrm() is equivalent to: &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;strncpy(s1, s2, n);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;return strlen(s1);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;PARAMETERS&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;s1  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;Either NULL, or a pointer to a buffer to receive the transformed string. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;s2  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;Points to a null-terminated string to be transformed for collating. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;n  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;Is the maximum number of characters to transform. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;RETURN VALUES&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The strxfrm() function returns the length of the transformed string, excluding the terminating null character. If the value returned is n or more, the contents of the array pointed to by s1 are undetermined. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;If strxfrm() encounters a character outside of the collating sequence defined for the current locale, it sets errno to EINVAL. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;CONFORMANCE&lt;br&gt;&lt;br /&gt;&lt;br /&gt;ANSI/ISO 9899-1990. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;MULTITHREAD SAFETY LEVEL&lt;br&gt;&lt;br /&gt;&lt;br /&gt;MT-Safe, with exceptions. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;This function is MT-Safe as long as no thread calls setlocale() while this function is exec&lt;br&gt;Reply:it downloads pornography&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-1086814826828653667?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/1086814826828653667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/can-someone-explain-to-me-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1086814826828653667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1086814826828653667'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/can-someone-explain-to-me-function.html' title='Can someone explain to me the function strxfrm() in C++?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-3521793883901201554</id><published>2009-07-12T22:53:00.000-07:00</published><updated>2009-07-12T22:53:00.259-07:00</updated><title type='text'>CSS Syntax Help?</title><content type='html'>What is usually the right css syntax when you want to insert a background that's in your own computer? I mean, the syntax would usually go like "background-image: &lt;br&gt;&lt;br /&gt;&lt;br /&gt;url('C:\Documents and Settings\admin.ADMIN-0BFEA6320\Desktop\P...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;background-repeat: repeat"&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;that but the background wouldn't appear! However, if I put the image in photobucket and use the photobucket instead, the background will appear. I want to know what's the right syntax/link for the css background, and no, I CANNOT put it in photobucket for serious testings, its really not an option so don't tell me to just upload it in photobucket.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;CSS Syntax Help?&lt;br&gt;The photo needs to be uploaded to your web server or you can add via a link to another web server (like PhotoBucket's) where it is hosted.  If its on your web server, you can use a relative path from the CSS document.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;background: #ffffff url(images/my_background.jpg) top left no-repeat;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Or on another web server, you can use an absolute path:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;background: #ffffff url(http://www.xyz.com/img/bckgd.jpg) top left no-repeat;&lt;br&gt;Reply:Unless your computer has a static IP address, you can't do it.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;If, however, you are lucky enough to have a specific IP address you would use the IP address to your machine followed by the file location (I would put it directly on the C: drive to make it easier on you).&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;BTW, unless you are using your computer as a web-server or are paying an exorbitant amount of money for your internet connection, you probably do not have a static IP address.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Instead of photobucket, you could try imageshack.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://11orange.blogspot.com/&gt;orange&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-3521793883901201554?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/3521793883901201554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/css-syntax-help.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3521793883901201554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3521793883901201554'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/css-syntax-help.html' title='CSS Syntax Help?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-6958725974223993587</id><published>2009-07-12T22:52:00.002-07:00</published><updated>2009-07-12T22:52:41.772-07:00</updated><title type='text'>C++ doubts..........?</title><content type='html'>hi !!!!!!!!!!!! can u help me how to study advanced c++ ? i cant understand anything about the syntax etc. of structures, classes, functions, nested functions, nested structures and their application in programs............. if u kno anythin..plz tell me too ! thanku..&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;C++ doubts..........?&lt;br&gt;%26gt; can u help me how to study advanced c++ ?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Yes, start with beginner's C++ first.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;%26gt; i cant understand anything about the syntax etc. of structures, classes, functions, nested functions, nested structures and their application in programs&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;So you basically don't know any C++? And you want to start with advanced C++?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Get either C++ Primer (4th Edition) by Lippman or Accelerated C++ by Koenig. These are the two books I recommend for beginners. Both books are written by actual experts on C++ and are both technically accurate and complete.&lt;br&gt;Reply:Then you need to get a Structured Programming for beginners and plow through that.   All programming languages have many small parts which are used to do the actual work of the program.  Structured programs add a lot of structure (ah ha) which serves the purpose of restricting how the sections are used so that changing one part (inside a structure) does not affect anything else, making maintenance easier.  In older languages (like C), making a change inside a routine might affect many other parts in unknown ways because of the scope of variables.  When studies showed that maintaining programs cost a lot more than writing them in the first place, changes were made to reduce the risks and costs.  The most direct result, to my mind, is that instead of finding problems in completed programs, the programmer goes crazy trying to find which of the hundreds and hundreds of modules will actually do what is desired among the multiple gateways to the hidden operating system.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-6958725974223993587?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/6958725974223993587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-doubts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6958725974223993587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6958725974223993587'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-doubts.html' title='C++ doubts..........?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-8568472849266500970</id><published>2009-07-12T22:52:00.001-07:00</published><updated>2009-07-12T22:52:25.348-07:00</updated><title type='text'>Parsing a C program using compiler tools - LEX &amp; YACC?</title><content type='html'>How to write a C program (using compiler tools - Lex, YACC, Flex, Bison) that will parse a C program and generate a PHP file where the variables defined in the C Program will be defined following the syntax of  PHP.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Parsing a C program using compiler tools - LEX %26amp; YACC?&lt;br&gt;google.com&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-8568472849266500970?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/8568472849266500970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/parsing-c-program-using-compiler-tools.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8568472849266500970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8568472849266500970'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/parsing-c-program-using-compiler-tools.html' title='Parsing a C program using compiler tools - LEX &amp;amp; YACC?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-2949338911843234906</id><published>2009-07-12T22:52:00.000-07:00</published><updated>2009-07-12T22:52:09.713-07:00</updated><title type='text'>A question in C?</title><content type='html'>printf("%d", printf("tim")); &lt;br&gt;&lt;br /&gt;&lt;br /&gt;This statement provides the output as : ??&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The options are:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;a) syntax error                b)  Outputs tim 3          c) outputs garbage              d) prints tim and terminates abruptly&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Guyz.. I also need the reason as why is the answer so.. !!&lt;br&gt;&lt;br /&gt;&lt;br /&gt;thx&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;A question in C?&lt;br&gt;To evaluate the first printf, we need to know the value of the second printf. Here is the prototype for printf:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int printf(const char *format, ...)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Notice that it returns an int, which is exactly what the first printf specifies to print. So the second printf is evaluated (prints "tim"), then returns an integer, and the first printf prints that integer, and returns an integer which is ignored.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The first answerer is incorrect; there is no syntax error in this code (try compiling and running it).&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;For what it's worth, my attempt outputted "michael 7" on stdout.&lt;br&gt;Reply:Syntax error big time.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;You have a printf statement inside a printf statement.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The printf statetement takes two arguments.  The first is the format string, and the second is the actual value to print.  You don't need the second "printf" or the paranthesis.&lt;br&gt;Reply:The answer is b) since printf returns an int and the inner printf will be evaluated first.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-2949338911843234906?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/2949338911843234906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/question-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2949338911843234906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2949338911843234906'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/question-in-c.html' title='A question in C?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-8120278839868134936</id><published>2009-07-12T22:51:00.003-07:00</published><updated>2009-07-12T22:51:55.093-07:00</updated><title type='text'>What is a good c# book for senior vb.net developer?</title><content type='html'>I am looking for a good book to use as a reference book that is advanced enough for a senior developer (.net 2.0 framework preferred). The catch is that I am senior at vb.net. and have only limited experience in c#. For instance, if I want to lookup how to cast a variable, or how to add an event handler, I want a book that will show syntax for both basic and advanced c# techniques.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Thanks for the suggestions!!&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;What is a good c# book for senior vb.net developer?&lt;br&gt;Microsoft Press's C# Core Reference&lt;br&gt;Reply:I'm a fan of the Wrox books. Professional C# 2005 (Wrox Professional Guides) (Paperback). You don't need to start from stratch since you know the .NET Framework already. It is just syntax you are learning.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://2flash-cards.blogspot.com/&gt;flash cards&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-8120278839868134936?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/8120278839868134936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-good-c-book-for-senior-vbnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8120278839868134936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8120278839868134936'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-good-c-book-for-senior-vbnet.html' title='What is a good c# book for senior vb.net developer?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-3267315958235407049</id><published>2009-07-12T22:51:00.002-07:00</published><updated>2009-07-12T22:51:36.698-07:00</updated><title type='text'>Create a database using c?</title><content type='html'>create a database for employees.first check for syntax("create table employee(name,varchar(20),salary,numeric... the syntax is correct then create a structure employee with name and salary in it.like this do for insert,delete,update.only the syntax is same as in sql.A c program is needed to check the syntax and to create the structure.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Create a database using c?&lt;br&gt;Your "create table..." statement is SQL statement.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;It means, you need connect to some SQL server using DAO/ODBC/ADO/etc. and send to the server your SQL command. What is your SQL server and API you will use - it depends solely on your taste.&lt;br&gt;Reply:Do you know what you want. When you talk about database, talk about the db software and the sql tools. C and java is only for connectivity and presentation.&lt;br&gt;Reply:PCQuest : Enterprise : Using FireBird RDBMS  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;... create a FireBird database called data.fdb in C:\ using the default database ... will create a user 'testuser' with password 'test'. You do this using the sysdba ...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;http://www.pcquest.com/content/enterpris...&lt;br&gt;Reply:what is your question?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-3267315958235407049?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/3267315958235407049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/create-database-using-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3267315958235407049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3267315958235407049'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/create-database-using-c.html' title='Create a database using c?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-3734024184036590841</id><published>2009-07-12T22:51:00.001-07:00</published><updated>2009-07-12T22:51:20.661-07:00</updated><title type='text'>Fellow C++ programmers out there.... pls help..?</title><content type='html'>What are some few syntax that are found in Visual C++ 6 that is not found in Turbo Borland C++ 4.5? I am using the old compiler which is Turbo C++ 4.5 and I am used to it. Our company's senior programmer told me that it is cooler to use visual C++ than C++ 4.5? Where to download Visual C++ for free??? Thank you so much in advance...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;For those who answered my question about connecting C++ to MySQL, I already found a good site: http://www.cpp-home.com/tutorial.php?22_... Thank you very much also for responding..&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Fellow C++ programmers out there.... pls help..?&lt;br&gt;if you want to be really cool, you have to use gcc :-p&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;well, turbo C and visual C 6 are both old, and don't implement all facets and details of the C++ standard (which is very big and complex). Also, the standard libraries are a bit different. And therefore the code is not always 100% compatible to the standard, and therefore you have those problems.&lt;br&gt;Reply:After a lot of research, I obtained free copies of Visual C++ from Microsoft. There was a 64 bit version  (that I wanted) in Microsoft Platform SDK for Windows Server 2003 SP1 with 32 bit versions in Microsoft DDK for Windows and Visual C++ Toolkit 2003. These are command line driven and I used my old Watcom software to create/edit source code. See:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;http://freespace.virgin.net/roy.longbott...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;It seems that things have now changed somewhat but you might still be able to get free copies.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://flower-girl2.blogspot.com/&gt;flower girl&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-3734024184036590841?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/3734024184036590841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/fellow-c-programmers-out-there-pls-help.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3734024184036590841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3734024184036590841'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/fellow-c-programmers-out-there-pls-help.html' title='Fellow C++ programmers out there.... pls help..?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-8841568770719754161</id><published>2009-07-12T22:51:00.000-07:00</published><updated>2009-07-12T22:51:05.262-07:00</updated><title type='text'>Anyone know any sites with sample C# or Java programs to learn from?</title><content type='html'>I'm looking for sites that kinda show you step-by-step examples or even exercises of programs in C# and JAVA. I know the syntax of both and I've learned them (in prior classes) it's just I need a motivational way to further my skills and I learn best from example.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;If anyone knows any sites that have these I would very much appreciate it!&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Thanks!!&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Anyone know any sites with sample C# or Java programs to learn from?&lt;br&gt;www.pekiyi.150m.com/java.html&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-8841568770719754161?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/8841568770719754161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/anyone-know-any-sites-with-sample-c-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8841568770719754161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8841568770719754161'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/anyone-know-any-sites-with-sample-c-or.html' title='Anyone know any sites with sample C# or Java programs to learn from?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-7754996647311383968</id><published>2009-07-12T22:50:00.003-07:00</published><updated>2009-07-12T22:50:49.950-07:00</updated><title type='text'>What is the program code in C programming that when i after i 10 numbers i could get the sum?</title><content type='html'>I really need the syntax or the code in C programming that after i enter ten (10) numbers, then i can get their sum. Please help me. Thank you so much. Godbless!!&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;What is the program code in C programming that when i after i 10 numbers i could get the sum?&lt;br&gt;#include%26lt;stdio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include%26lt;conio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;clrscr();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int sum= 0,num;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;printf("Enter 10 numbers");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;for(i=0;i%26lt;=10;i++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;scanf("%d",%26amp;num);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;sum = sum + num;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;printf("Total Sum = %d",sum);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;getch();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;this program wat it does is it keeps adding the numbers as soon as you input them and so at the end when u tell it to output the value of sum u get the total sum of all the numbers that u entered.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-7754996647311383968?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/7754996647311383968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-program-code-in-c-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/7754996647311383968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/7754996647311383968'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-program-code-in-c-programming.html' title='What is the program code in C programming that when i after i 10 numbers i could get the sum?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-3153993365389687294</id><published>2009-07-12T22:50:00.002-07:00</published><updated>2009-07-12T22:50:32.495-07:00</updated><title type='text'>What is the code in C programming that after i 10 numbers i could get their sum?</title><content type='html'>I really need the syntax or the code in C programming that after i enter ten (10) numbers, then i can get their sum. Please help me. Thank you so much. Godbless!!&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;What is the code in C programming that after i 10 numbers i could get their sum?&lt;br&gt;#include%26lt;stdio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include%26lt;conio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;clrscr();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int sum=0, num,avg;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;printf("Enter 10 numbers");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;for(i=0;i%26lt;=10;i++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;scanf("%d",%26amp;num);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;sum=sum+num;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;avg=sum/10;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;printf("Sum = %d\nAverage =%d\n",sum,avg);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;getch();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;Reply:Has anyone seen a question more lame??Please let me know if you have...&lt;br&gt;Reply://heres what I would do:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int a^=a;for(int p=a;p%26lt;012;++p)a+=n[p];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;//where n[] is your array of 10 numbers, and a is the total&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://curse-of-the-golden-flower.blogspot.com/&gt;curse of the golden flower&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-3153993365389687294?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/3153993365389687294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-code-in-c-programming-that_12.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3153993365389687294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3153993365389687294'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-code-in-c-programming-that_12.html' title='What is the code in C programming that after i 10 numbers i could get their sum?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-4397028091364065565</id><published>2009-07-12T22:50:00.001-07:00</published><updated>2009-07-12T22:50:18.490-07:00</updated><title type='text'>What is the code in C programming that after i 10 numbers i could get their average?</title><content type='html'>What is the code in C programming that after i 10 numbers i could get their average?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I really need the syntax or the code in C programming that after i enter ten (10) numbers, then i can get their average. Please help me. Thank you so much. Godbless!!&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;What is the code in C programming that after i 10 numbers i could get their average?&lt;br&gt;I'm not going to do your homework for you, but the general structure of your program should look like this:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;----------------------&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Declare the array 'input'&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Declare the number 'total'&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Repeat 10 times:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;-----Read in a number from the keyboard into the array 'input'&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Set 'total' equal to '0'&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Repeat for i=1 to 10:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;-----Add 'input' array element 'i' to 'total'&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Divide 'total' by 10&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Print out 'total'&lt;br&gt;&lt;br /&gt;&lt;br /&gt;----------------------&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The syntax for all of those lines should be in your text book, or is easy to find on the internet.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;___________________&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Hope that helps, Adam&lt;br&gt;&lt;br /&gt;&lt;br /&gt;My online games website: http://www.cygnetgames.co.uk&lt;br&gt;Reply:Try this, it has syntax and operators&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;http://www.cs.duke.edu/csed/tapestry/how...&lt;br&gt;Reply:#include%26lt;stdio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include%26lt;conio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;clrscr();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int sum=0, num,avg;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;printf("Enter 10 numbers");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;for(i=0;i%26lt;=10;i++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;scanf("%d",%26amp;num);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;sum=sum+num;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;avg=sum/10;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;printf("Average =%d\n",sum,avg);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;getch();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-4397028091364065565?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/4397028091364065565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-code-in-c-programming-that.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4397028091364065565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4397028091364065565'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-code-in-c-programming-that.html' title='What is the code in C programming that after i 10 numbers i could get their average?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-4553494513159228985</id><published>2009-07-12T22:50:00.000-07:00</published><updated>2009-07-12T22:50:00.873-07:00</updated><title type='text'>C++ help!!?</title><content type='html'>I want to print using cout with an argument.. if the argument returns a true print this, if it returns this print this.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Don't use IFs.. I think it's something like this...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout %26lt;%26lt; (argument) ? : "hello" : "bye";&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;that doesn't compile, but the syntax is something like that.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;C++ expert please help.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;C++ help!!?&lt;br&gt;drop the : between ? and "hello", i.e.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;(argument) ? "hello" : "bye"&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;This syntax is also supported in many other languages beside C/C++.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;However, in the business world, it is often considered a security risk for reasons I have yet to comprehend.&lt;br&gt;Reply:cout %26lt;%26lt; (argument) ? : "hello" : "bye";//its wrong&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout %26lt;%26lt; (argument) ? "hello" : "bye";//use this&lt;br&gt;Reply:previous answerer is correct. Just follow him. The line should compile. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout%26lt;%26lt; (arguement)? "print this" : "otherwise print this ";&lt;br&gt;Reply:It's not an argument. An argument is a parameter to a function, and you're not calling a function.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;It's:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout %26lt;%26lt; ((expression) ? "hello" : "byte");&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-4553494513159228985?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/4553494513159228985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-help.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4553494513159228985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4553494513159228985'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-help.html' title='C++ help!!?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-8636901152953228717</id><published>2009-07-12T22:49:00.002-07:00</published><updated>2009-07-12T22:49:44.810-07:00</updated><title type='text'>C problem, function &amp; pointer declaration error?</title><content type='html'>Hi, &lt;br&gt;&lt;br /&gt;&lt;br /&gt;When i run this code, I get the following error. When i remove the function declarations it compiles. But function+pointer declarations give the error!&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Urgent project deadline - please help!!&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Error 1 error C2143: syntax error : missing ';' before 'type' c:\nofrduk\Microscribe2\MicroRun7...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void main(){&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    FILE *posrot;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  char letter;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  float DeltaLonger=0.25f;                    // Diff. by which special stylus tip is longer than original one&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  double A;                                   // declare stylus rotation angle&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  arm_rec arm;                                // declare "struct arm_rec"&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  arm_init(%26amp;arm);                             // initialize "struct arm_rec" for further use&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  arm_length_units(%26amp;arm,MM);                  // want millimeters&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  arm_angle_units(%26amp;arm, DEGREES);             // want degrees&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;double ** p1 = (double **)malloc(sizeof(double)*ROW*COL);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    double ** p1_t = (double **)malloc(sizeof(double)*ROW2*COL2);&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;C problem, function %26amp; pointer declaration error?&lt;br&gt;Are you trying to call the functions or declare them in main()? If you're declaring them they need a return type. If you're calling them then they need declaring outside the scope of main() and also defining. The code snippet you've given also doesn't include any definition or declaration of the structs you're using - you'll need these as well.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Also main should always return an int.&lt;br&gt;Reply:things would be so much easier if you could post the error message, and not just truncate it. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;you have a lot of problems in the code.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;// is not a valid comment for C, only for C++. But you say you have a C problem.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;you didn't include header files.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;your declaration of p1 and p2 is AFTER executable code - that's not allowed in C, only in C++. You have to move the declaration of p1 and p2 to the top of the function, below "arm_rec arm;" or "double A;" .&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;etc. etc.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-8636901152953228717?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/8636901152953228717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-problem-function-pointer-declaration.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8636901152953228717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8636901152953228717'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-problem-function-pointer-declaration.html' title='C problem, function &amp;amp; pointer declaration error?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-5803848702817818748</id><published>2009-07-12T22:49:00.001-07:00</published><updated>2009-07-12T22:49:29.542-07:00</updated><title type='text'>For file io in c++ how do i count all the words in a file?</title><content type='html'>the question %26gt;%26gt;%26gt;6. Create a method named “totalWordCount()” that will return the value of how many TOKENS are on IN THE FILE. Display your answer to the screen.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;my code is [code] # include %26lt;iostream%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;# include %26lt;string%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;# include %26lt;stdlib.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;# include %26lt;stdio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;# include %26lt;fstream%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;# include %26lt;ctype.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;using namespace std;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void displayFile(ifstream %26amp;in);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void totalWordCount();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout%26lt;%26lt;" Mateen Rehman"%26lt;%26lt;endl;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;ifstream infile;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;infile.open("I:/FILEIOLabDATAFILE.txt"... ios_base::in);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;if(infile.fail( ))&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout%26lt;%26lt; " The File was not successfully open"%26lt;%26lt;endl;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;exit(1);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;displayFile(infile);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;infile.close( );&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void displayFile(ifstream %26amp;in)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;while(!(in.eof()))&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;char line[200];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;in.getline(line, 200, '\n');&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;for (int i=0; i%26lt;200; i++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout %26lt;%26lt; num1%26lt;%26lt;endl;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;[/code]&lt;br&gt;&lt;br /&gt;&lt;br /&gt;my errors are 1%26gt;c:\documents and settings\hafizsahib\my documents\visual studio 2008\projects\file io\file io\file io.cpp(24) : error C2143: syntax error : missing ';' before '}'&lt;br&gt;&lt;br /&gt;&lt;br /&gt;1%26gt;c:\documents and settings\hafizsahib\my documents\visual studio 2008\projects\file io\file io\file io.cpp(25) : error C2065: 'in' : undeclared identifier&lt;br&gt;&lt;br /&gt;&lt;br /&gt;1%26gt;c:\documents and settings\hafizsahib\my documents\visual studio 2008\projects\file io\file io\file io.cpp(25) : error C2228: left of '.eof' must have class/struct/union&lt;br&gt;&lt;br /&gt;&lt;br /&gt;1%26gt;        type is ''unknown-type''&lt;br&gt;&lt;br /&gt;&lt;br /&gt;1%26gt;c:\documents and settings\hafizsahib\my documents\visual studio 2008\projects\file io\file io\file io.cpp(25) : fatal error C1903: unable to recover from previous error(s); stopping compilation&lt;br&gt;&lt;br /&gt;&lt;br /&gt;thanks&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;For file io in c++ how do i count all the words in a file?&lt;br&gt;Okay.  Let's start with the joke.  Error number 1.  You're using Visual Studio 2008 instead of a real compiler.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I'll assume this is homework, and you don't have a choice.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Major point here.  Why do you have curly brackets AROUND the definition of the header on lines  24, 25?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The format of your program should be &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;//Declares  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;// in standard C++ they should be:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;# include %26lt;iostream%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;# include %26lt;string%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;# include %26lt;cstdlib%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;# include %26lt;cstdio%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;# include %26lt;fstream%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;# include %26lt;cctype%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;using namespace std;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;//Function Declarations&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void displayFile(ifstream %26amp;in);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void main() //I use int main() and return 0&lt;br&gt;&lt;br /&gt;&lt;br /&gt;//But what do I know?  I'm an old C programmer&lt;br&gt;&lt;br /&gt;&lt;br /&gt;// on Linux&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void displayFile(ifstream %26amp;in)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  while...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;If you look at your file, the errors start where it says  -- and I am quoting:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt; void displayFile(ifstream %26amp;in)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;DO NOT EVER declare the function name in brackets like that.  They create a scope.  When you close the brackets the scope ends and the name no longer exists.  Further, you then have the body of the function as a series of commands in the lowest possible level.  If they were to compile the program would have no means of accessing them.  So the function should read:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void displayFile(ifstream %26amp;in)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;while(!(in.eof()))&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;char line[200];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;in.getline(line, 200, '\n');&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;for (int i=0; i%26lt;200; i++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout %26lt;%26lt; num1%26lt;%26lt;endl;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;As for the specific assignment, I've put a link to the cstring or string.h library's strtok() function documentation in sources.  Y'know around the turn of the millenium, when C++ added the STL library, a split between C and C++ programming happened -- specifically in the #includes.  If it is a standard C library you are supposed to indicate it by putting a c in front and dropping the .h.  If Microsoft is mixing the  old libraries for C and the new ones for C++, then there is one more defective product out there to hate them for.  My GCC library includes this in the cstring header file:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;/** @file cstring&lt;br&gt;&lt;br /&gt;&lt;br /&gt; *  This is a Standard C++ Library file.  You should @c #include this file&lt;br&gt;&lt;br /&gt;&lt;br /&gt; *  in your programs, rather than any of the "*.h" implementation files.&lt;br&gt;&lt;br /&gt;&lt;br /&gt; *&lt;br&gt;&lt;br /&gt;&lt;br /&gt; *  This is the C++ version of the Standard C Library header @c string.h,&lt;br&gt;&lt;br /&gt;&lt;br /&gt; *  and its contents are (mostly) the same as that header, but are all&lt;br&gt;&lt;br /&gt;&lt;br /&gt; *  contained in the namespace @c std (except for names which are defined&lt;br&gt;&lt;br /&gt;&lt;br /&gt; *  as macros in C).&lt;br&gt;&lt;br /&gt;&lt;br /&gt; */&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://1apricot.blogspot.com/&gt;apricot&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-5803848702817818748?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/5803848702817818748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/for-file-io-in-c-how-do-i-count-all.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/5803848702817818748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/5803848702817818748'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/for-file-io-in-c-how-do-i-count-all.html' title='For file io in c++ how do i count all the words in a file?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-7803586555769815642</id><published>2009-07-12T22:49:00.000-07:00</published><updated>2009-07-12T22:49:12.833-07:00</updated><title type='text'>I do have MYSQLdatabase and using PHP language... What syntax do i will use to search by typing a specific?</title><content type='html'>word and displays all the search ones.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;eg..   in my database...    recorded   samples ....&lt;br&gt;&lt;br /&gt;&lt;br /&gt;           edwin&lt;br&gt;&lt;br /&gt;&lt;br /&gt;           john&lt;br&gt;&lt;br /&gt;&lt;br /&gt;           john michael&lt;br&gt;&lt;br /&gt;&lt;br /&gt;           andrew&lt;br&gt;&lt;br /&gt;&lt;br /&gt;           Lloyd john&lt;br&gt;&lt;br /&gt;&lt;br /&gt;           Eunice&lt;br&gt;&lt;br /&gt;&lt;br /&gt;            John C. Goerge&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;from the search form ... upon typing the word "john"&lt;br&gt;&lt;br /&gt;&lt;br /&gt;it will search from the database and displays all  related to the word john&lt;br&gt;&lt;br /&gt;&lt;br /&gt;eg.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    John&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    John Michael&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    Lloyd John&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    John C. Goerge&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Please give me the syntax on the search form and on the display form... Thanks&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;I do have MYSQLdatabase and using PHP language... What syntax do i will use to search by typing a specific?&lt;br&gt;There are 2 main search queries that you can preform.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;1.  SELECT * FROM table_name WHERE (name LIKE '%$string%')&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;2.  SELECT * FROM table_name WHERE MATCH(name) AGAINST('*$string*' IN BOOLEAN MODE)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The second one is much faster, but has its limitations.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;For more information on this and for ways to improve these basic queries, go to http://www.roscripts.com/PHP_search_engi...&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-7803586555769815642?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/7803586555769815642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/i-do-have-mysqldatabase-and-using-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/7803586555769815642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/7803586555769815642'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/i-do-have-mysqldatabase-and-using-php.html' title='I do have MYSQLdatabase and using PHP language... What syntax do i will use to search by typing a specific?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-7496513354016923797</id><published>2009-07-12T22:48:00.003-07:00</published><updated>2009-07-12T22:48:57.460-07:00</updated><title type='text'>How to read a file  through writing a C program?</title><content type='html'>I need to read a file such as abc.txt or abc.xls when i compile a C progam. i.e., i should read a personal file through output of a c program.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I need the Syntax for this Plz!!&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;How to read a file  through writing a C program?&lt;br&gt;I think guys have given all the function needed to open a text file through C. But i want to remind you that you want be able read the Containts of a Excel or word File using C.&lt;br&gt;Reply:char buffer[4096];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;FILE *f = fopen( full_path_name, "rt" );&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;while( fgets( buffer, 4096, f ))&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;/* do something with the data you have read. */&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;fclose( f );&lt;br&gt;Reply:Wel I feel all the coding is here, the correct C approach is by mentioning the  stdio.h header&lt;br&gt;&lt;br /&gt;&lt;br /&gt;FILE *handle; /* [hope u know what that means; it is a file handle pointer, pointuing to the segment:offset value of the file styruicture prepared inC]*/&lt;br&gt;&lt;br /&gt;&lt;br /&gt;/* then use: fscanf(pointer,format,variable) to read and fprintf(pointer, format, variabkle) to print to a file. You can also use fgetc, fgets, fputc, fputs for the same, Use fseek to seek, and ftell to return the file position handle, which is actually long value. Use fwrite to overwrite values indatabases*/&lt;br&gt;&lt;br /&gt;&lt;br /&gt;For C++ it uses fstream.h and the coding is&lt;br&gt;&lt;br /&gt;&lt;br /&gt;fstream *handler; // for both input and output file operations&lt;br&gt;&lt;br /&gt;&lt;br /&gt;ifstream *handler1; // for only input&lt;br&gt;&lt;br /&gt;&lt;br /&gt;ofsteram *handler2; // for only output&lt;br&gt;&lt;br /&gt;&lt;br /&gt;/* REFER TO C++ documentation for help on this, Iam not too much inclined on C++ programming, sorry! But i know it is way easier in C++, by overloading objects of fstream class by opetators:  %26gt;%26gt; and %26lt;%26lt; for input and output operations respectively. CALL me crazy but I prefer C style*/&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;NOTE: Both styles compile under the standard C compiler&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The Excel, Word,Bmp files are just files of spoecial formats, you know the file format and wolla!, you can access and read, modify a Excel, Word, Bmp, etc, files from ur program that Microsoft Windows can easily recogise!&lt;br&gt;Reply:C has lot of functions for file handling.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;1. Open a file by using fopen( ).&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   ex: FILE *fp=fopen("filename", "r");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;2. Char by char reading:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   char ch;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    while((ch=fgetc(fp)) != null) printf("%c", ch);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;3. Reading line by line:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    char str[81];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    while(fgets(fp,str,81)!= null) printf("%s", str);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;after you are done, close the file.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;4. fclose(fp);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;HTH.&lt;br&gt;Reply:I don't really know what you want but the code to read a file is simple.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;ex . your file can be somthing like this :&lt;br&gt;&lt;br /&gt;&lt;br /&gt;data1  value1&lt;br&gt;&lt;br /&gt;&lt;br /&gt;data2  value2&lt;br&gt;&lt;br /&gt;&lt;br /&gt;data3  value4&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;let's say that data1,data2,data3 are integers and value1,2,3 are strings (without space between words)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;you can read the data like this : &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include%26lt;stdio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void main(){&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int data;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;char value[100];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;FILE *f=fopen("abc.txt","r");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;while(!feof(f)){&lt;br&gt;&lt;br /&gt;&lt;br /&gt;     fscanf(f,"%d",%26amp;data);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;     fscanf(f,"%s",%26amp;value);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  //now you can process value and data in your interest nd that's it&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  // for exmple printf("%d %s",data,vlue);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-7496513354016923797?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/7496513354016923797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-to-read-file-through-writing-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/7496513354016923797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/7496513354016923797'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-to-read-file-through-writing-c.html' title='How to read a file  through writing a C program?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-225350621160700106</id><published>2009-07-12T22:48:00.002-07:00</published><updated>2009-07-12T22:48:41.955-07:00</updated><title type='text'>"scan" statement in VB and FoxPro? and "case" statement in Turbo C? is there such thing?</title><content type='html'>a sample code? website where I can find a program code for VB and FoxPro with "scan" or equivalent syntax/statement? same to the "case" syntax/statement for Turbo C???&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Thanks 4 any help!&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;"scan" statement in VB and FoxPro? and "case" statement in Turbo C? is there such thing?&lt;br&gt;VB: there is no Scan-Endscan.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;VFP: Scan-Endscan perform looping (like a do while-enddo) in relation reading each record of a table based on the condition specified on the Scan command. This is different from the switch-case of Turbo-C.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;e.g. (from VFP MSDN help)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;USE customer  %26amp;%26amp; Opens Customer table&lt;br&gt;&lt;br /&gt;&lt;br /&gt;CLEAR&lt;br&gt;&lt;br /&gt;&lt;br /&gt;SCAN FOR UPPER(country) = 'SWEDEN'&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   ? contact, company, city&lt;br&gt;&lt;br /&gt;&lt;br /&gt;ENDSCAN&lt;br&gt;&lt;br /&gt;&lt;br /&gt;*-------------------------------------...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Turbo-C: switch-case-default:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The switch and case keywords evaluate expression and execute any statement associated with constant-expression whose value matches the initial expression. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;If there is no match with a constant expression, the statement associated with the default keyword is executed. If the default keyword is not used, control passes to the statement following the switch block.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;e.g.:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;switch( c ) &lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    case 'A':&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        capa++;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    case 'a':&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        lettera++;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    default :&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        total++;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-225350621160700106?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/225350621160700106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/scan-statement-in-vb-and-foxpro-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/225350621160700106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/225350621160700106'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/scan-statement-in-vb-and-foxpro-and.html' title='&quot;scan&quot; statement in VB and FoxPro? and &quot;case&quot; statement in Turbo C? is there such thing?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-8888681943749369401</id><published>2009-07-12T22:48:00.001-07:00</published><updated>2009-07-12T22:48:24.614-07:00</updated><title type='text'>Help me with a C program...?</title><content type='html'>I wrote this C program but it doesn't work... &lt;br&gt;&lt;br /&gt;&lt;br /&gt;It is about arrays...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I would appreciate your help...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;main ()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int Array a1[2][3]={{1,2,3},(4,5,6),(7,8,9)};&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int Array a2[2][3]={(9,8,7),(6,5,4),(3,2,1)};&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int Array a3[2][3];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int i,j;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;for (i=0; i%26lt;2;i++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt; for (j=0; j%26lt;3; j++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  a3[i][j]=a1[2][3]+a2[2][3];&lt;br&gt;&lt;br /&gt;&lt;br /&gt; }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;for (i=0; i%26lt;2;i++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt; for (j=0; j%26lt;3; j++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;      printf ("%5d",a3[2][3]);&lt;br&gt;&lt;br /&gt;&lt;br /&gt; }&lt;br&gt;&lt;br /&gt;&lt;br /&gt; getch();&lt;br&gt;&lt;br /&gt;&lt;br /&gt; }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;P.S I'm not sure about the arrays syntax...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I use turbo c++ 3.0 compiler&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Help me with a C program...?&lt;br&gt;Your array declarations have a few problems.  The word Array is both unnecessary and incorrect.  You also are declaring a 2x3 multi-dimensional array, but you are initializing it with a 3x3 multi-dimensional array.  The initialization is also using parentheses instead of curly braces.  The correct declaration for array a1 would be:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int a1[2][3] = {{1,2,3}, {4,5,6}};&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I corrected what I found as errors and ended up with the following code:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;stdio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int main ()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    int a1[2][3] = {{1,2,3},{4,5,6}};&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    int a2[2][3] = {{6,5,4},{3,2,1}};&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    int a3[2][3];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    int i,j;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    for (i=0; i%26lt;2; i++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        for (j=0; j%26lt;3; j++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;            a3[i][j] = a1[i][j] + a2[i][j];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    for (i=0; i%26lt;2; i++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        for (j=0; j%26lt;3; j++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;            printf("%5d",a3[i][j]);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        printf("\n");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;    return 0;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Copying and pasting should show you the correct indentation.  Hope this helps.&lt;br&gt;Reply:replace this:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int Array a1[2][3]={{1,2,3},(4,5,6),(7,8,9)};&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int Array a2[2][3]={(9,8,7),(6,5,4),(3,2,1)};&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int Array a3[2][3];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;by this:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int a1[3][3]={{1,2,3},{4,5,6},{7,8,9}};&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int a2[3][3]={{9,8,7},{6,5,4},{3,2,1}};&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int a3[3][3];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;also printf might need this line at the beginning:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;stdio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;and getch might need also some header file, not sure which one (I'm not having turbo c++ right now), maybe:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;conio.h%26gt;&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://4song-words.blogspot.com/&gt;song words&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-8888681943749369401?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/8888681943749369401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/help-me-with-c-program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8888681943749369401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8888681943749369401'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/help-me-with-c-program.html' title='Help me with a C program...?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-7346333627185486088</id><published>2009-07-12T22:48:00.000-07:00</published><updated>2009-07-12T22:48:08.571-07:00</updated><title type='text'>Do I have to learn C very well, before starting C++ ?</title><content type='html'>I know the basic syntax and programming  in C.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;But,I dont know much about structures, pointers and memory management.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Now, I am in a position to learn C++.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Do I have to learn C very well, before starting C++ ?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;And Which is the best book to start with C++? &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;devi&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Do I have to learn C very well, before starting C++ ?&lt;br&gt;I found that it was a handicap to learn C before C++, because they operate along different paradigms...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;C = functional&lt;br&gt;&lt;br /&gt;&lt;br /&gt;C++ = object oriented&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The reason that learning C first is a handicap, is that C++ compilers will let you write non-object-oriented code (eg C code) and you end up not learning, or getting the benefit of, object-oriented code :-)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Knowing about pointers, structures and memory management is very useful :-)&lt;br&gt;Reply:You an learn them both at the same time if you wish.. just keep track of the differences between their structures and the syntax of some of their commands.&lt;br&gt;Reply:in real life you want to work with comps u have to learn all the basics i would start with c&lt;br&gt;Reply:C++ is a superset of C, it introduces additional capabilities and changes the syntax slightly.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Go for the C++, but check the pre requisites of the course.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Don't buy The C++ Programming Language by Stroustrup, he may have designed the language but the book is a reference and not a learning book.&lt;br&gt;Reply:No, some people just start with C++. C is just a prievious version of C++ (ex. Windows 95 vs Windows XP).&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;This is my fav C++ starter book - Good luck !:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;http://www.amazon.com/C%2B%2B-How-Progra...&lt;br&gt;Reply:In my opinion, you are in the perfect position to start learning C++.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The basic syntax for C and C++ is pretty much the same, but the techniques used to handle structures and memory management are very different. I think you may even find it easier to understand C++ data structures without having learned them in C, but I am certain there are plenty of peoprl who would argue that point with me.&lt;br&gt;Reply:you dont need to know one to learn the other. Learn c or c++ visually is a great book to start with.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-7346333627185486088?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/7346333627185486088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/do-i-have-to-learn-c-very-well-before.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/7346333627185486088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/7346333627185486088'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/do-i-have-to-learn-c-very-well-before.html' title='Do I have to learn C very well, before starting C++ ?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-2944556011537031357</id><published>2009-07-12T22:47:00.003-07:00</published><updated>2009-07-12T22:47:52.442-07:00</updated><title type='text'>What is .Net? Is .Net a programming language, just like the way C++ is?</title><content type='html'>If yes, then it means you have to sit down and learn the syntax?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I know C++ and Java. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;Is .Net a whole new different language?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;What is .Net? Is .Net a programming language, just like the way C++ is?&lt;br&gt;.Net is a lot of things.  You would call the whole thing a 'platform'.  The main programming language of .Net is CIL, Common Intermediate Language.  All .Net programs compile to CIL, and the syntax of CIL looks a lot like assembly code.  Most .Net programmers never write in CIL nor do they know the syntax.  They use a language like C# or VB.Net, which is compiled to CIL.  The benefit of CIL is, when the program is run, each time a function is first run, the CIL is compiled to platform specific machine code and cached for later use by the program (this cache dies when the program closes).  This means that you can write a program and run it on an Intel or an AMD machine and get different machine code (optimized for the processor) and the behavior of the program is the same.  It's not one programming language, but rather a platform for languages.  Microsoft makes C#, VB.Net and C++/CLI but their are over 30 .Net languages in total (including Perl.Net, PHP.Net and IronPython, to name a few).  Which one you want to use is your choice.  If you know Java or C++ I highly recommend C#, the syntax is nearly identical.  The only learning curve is learning the .Net framework, which is a set of class libraries to perform common tasks.  It is quite extensive and covers nearly every low level subsystem you might implement.&lt;br&gt;Reply:.net framework is a set of classes which you can use in languages associated with this framework. IT is not a language. It is something like Bytecode in JAVA and is a virtual machine that supports different windows computers.&lt;br&gt;Reply:net is nol like c++ or java&lt;br&gt;&lt;br /&gt;&lt;br /&gt;nor any language&lt;br&gt;&lt;br /&gt;&lt;br /&gt;it is a software like thing launched by different communication stations&lt;br&gt;&lt;br /&gt;&lt;br /&gt;i think u should ask a 12th c++ teacher&lt;br&gt;&lt;br /&gt;&lt;br /&gt;she would explain u better&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-2944556011537031357?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/2944556011537031357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-net-is-net-programming-language.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2944556011537031357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2944556011537031357'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-net-is-net-programming-language.html' title='What is .Net? Is .Net a programming language, just like the way C++ is?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-2912022906850957811</id><published>2009-07-12T22:47:00.002-07:00</published><updated>2009-07-12T22:47:36.561-07:00</updated><title type='text'>Can anyone give me a C++ code fragement for this?</title><content type='html'>a code fragment to search files on hard drive using wild cards, for filename  and also for the extension.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;i need this for my school project. please help.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;thanks.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;you could write the main part alone, the command and syntax.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;for Turbo C++ v 3.0&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Can anyone give me a C++ code fragement for this?&lt;br&gt;look up the functions findfirst and findnext, they could help you.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-2912022906850957811?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/2912022906850957811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/can-anyone-give-me-c-code-fragement-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2912022906850957811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2912022906850957811'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/can-anyone-give-me-c-code-fragement-for.html' title='Can anyone give me a C++ code fragement for this?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-532921782830475746</id><published>2009-07-12T22:47:00.001-07:00</published><updated>2009-07-12T22:47:20.754-07:00</updated><title type='text'>Best C book for unix?</title><content type='html'>I'm going to be starting a pretty big project in C and I'm unfamiliar with it besides the basic syntax. The last C books I bought were C for dummies, but that didn't seem to tell me much besides syntax.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Is there a good book out there that teaches the ins %26amp; outs of C specifically on unix?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Thanks!&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Best C book for unix?&lt;br&gt;Try The C programming language by Kernighan and Ritchie, 2nd edition and Expert C programming (forgot author name) and may be memory as a programming concept (haven't read this, but I hear good remarks about this in programmer circles).  For Unix in particular, I have read Advanced programming in the Unix environment and Advanced Linux programming.  But my present job doesn't delve deep into Unix specific things at programming level, so I am yet to look beyond these books.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Besides these, as you develop the project, you'll find things that books don't have answer for can be answered by other people who were in similar situations.  At that time, join comp.unix.programmer and comp.lang.c to ask other people your questions.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://1song-titles.blogspot.com/&gt;song titles&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-532921782830475746?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/532921782830475746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/best-c-book-for-unix.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/532921782830475746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/532921782830475746'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/best-c-book-for-unix.html' title='Best C book for unix?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-3633633248566676452</id><published>2009-07-12T22:47:00.000-07:00</published><updated>2009-07-12T22:47:05.783-07:00</updated><title type='text'>The file name,Directory Name,or volume Lable syntax is incorrect. Pls Help!!!?</title><content type='html'>The file name,Directory Name,or volume Lable syntax is incorrect.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;C:\Documents and Settings\User\ Desktop\Desktop\ \E\New Folder is not accessible&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;When i trying to open any folder or files on "My Computer" sometimes im getting this error message.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;If i close and reopen Windows Explorer that becomes normal for few minutes and keep getting that error message again.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Every time, C:\Documents and Settings\User\ Desktop\Desktop\ \&lt;br&gt;&lt;br /&gt;&lt;br /&gt;copying before the new path..&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Somebody pls tell me the possible reason for this error and how to fix it.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;The file name,Directory Name,or volume Lable syntax is incorrect. Pls Help!!!?&lt;br&gt;http://support.microsoft.com/kb/318746&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-3633633248566676452?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/3633633248566676452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/file-namedirectory-nameor-volume-lable.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3633633248566676452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3633633248566676452'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/file-namedirectory-nameor-volume-lable.html' title='The file name,Directory Name,or volume Lable syntax is incorrect. Pls Help!!!?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-6099569175037671848</id><published>2009-07-12T22:46:00.003-07:00</published><updated>2009-07-12T22:46:48.496-07:00</updated><title type='text'>UNIX vim editor syntax coloring for .pc files?</title><content type='html'>I am not able to see syntax highlighting in .pc files. I am using vim editor through putty. When i do syntax on, i see syntax colors in .c and .cpp files but not in .pc files.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;UNIX vim editor syntax coloring for .pc files?&lt;br&gt;what language is the .pc file? The syntax highlighting is based on programming language. The programming language is guessed using the file extension. If there is no support for the language in which you are trying to program, you do not get any syntax highlighting.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;On a side note, if you want to use one serious true (highly customizable) editor, consider using Emacs (http://www.emacswiki.org/cgi-bin/wiki). You can do amazing things in that editor (not just editing files...)&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-6099569175037671848?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/6099569175037671848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/unix-vim-editor-syntax-coloring-for-pc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6099569175037671848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6099569175037671848'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/unix-vim-editor-syntax-coloring-for-pc.html' title='UNIX vim editor syntax coloring for .pc files?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-88221572594501842</id><published>2009-07-12T22:46:00.002-07:00</published><updated>2009-07-12T22:46:32.600-07:00</updated><title type='text'>Good book for learning UML with C++?</title><content type='html'>I have a good grasp on C programming language, mainly advanced embedded C style programming.  However, I really want to learn OOP programming and design practices.  I have somewhat a decent understand of C++ OOP programming syntax and semantics but weak with the more advanced techniques such as inheritance and polymorphism.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;So, I want to know what a good book to get for learning OOP with C++ but also using UML for design? (I have a basic understanding of UML as well)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Thanks guys!&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Good book for learning UML with C++?&lt;br&gt;Here's a site which is excellent for learning UML and has all the diagrams you'll need to know:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;http://atlas.kennesaw.edu/~dbraun/csis46...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;You don't have UML with c++ because UML was designed to be independent of any language (general purpose), eg you can use uml with c++  and java.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The wiki page is quite helpful too&lt;br&gt;&lt;br /&gt;&lt;br /&gt; http://en.wikipedia.org/wiki/Unified_Mod...&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-88221572594501842?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/88221572594501842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/good-book-for-learning-uml-with-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/88221572594501842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/88221572594501842'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/good-book-for-learning-uml-with-c.html' title='Good book for learning UML with C++?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-2539820225505150136</id><published>2009-07-12T22:46:00.001-07:00</published><updated>2009-07-12T22:46:16.765-07:00</updated><title type='text'>Error handling in C++?</title><content type='html'>Hi experts!&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I'm learning C++. I wish to write a C++ program with exception handling.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Please give a simple program for divisor by zero using C++.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;And detail syntax for defining exception.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Error handling in C++?&lt;br&gt;Unlike Java, C++ does not have a standard exception for divide-by-zero so you have to build your own.  Many, arguably all, exceptions in c++ should be derived from the standard exceptions in, oddly enough, the stdexcept header file.  Since this is a runtime error this example derives from std::runtime_error.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;This should help you get started but it is obviously not a complete treatment of the topic of exceptions.  You should read more on your own.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;iostream%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;exception%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;stdexcept%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;using namespace std;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;class DivideByZeroException : public runtime_error&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;public:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   DivideByZeroException() : runtime_error("attempt to divide by zero" ) {}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;};&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   int num;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   int dem;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   int res;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   cout %26lt;%26lt; "Enter numerator: ";&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   cin %26gt;%26gt; num;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   cout %26lt;%26lt; "Enter denominator: ";&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   cin %26gt;%26gt; dem;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   try&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;      if (dem == 0)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;      {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;         throw DivideByZeroException();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;      }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;      res = num / dem;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;      cout %26lt;%26lt; "Result = " %26lt;%26lt; res %26lt;%26lt; endl;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   catch (DivideByZeroException %26amp;e)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;      cout %26lt;%26lt; "Exception: " %26lt;%26lt; e.what() %26lt;%26lt; endl;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   return(0);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;Reply:#include%26lt;stdio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include%26lt;conio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include%26lt;iostream.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int a,b,c;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cin%26gt;%26gt;a;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cin%26gt;%26gt;b;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;try&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;if(b==0)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;throw(1);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;catch(int)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout%26lt;%26lt;"divide error";&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;getch();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;Reply:use try and catch block. keep the code that causes exception in try block n the code for handling error in catch block.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;try{&lt;br&gt;&lt;br /&gt;&lt;br /&gt; int i = 5/0;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;catch(Exception e){ // well this is java code but still c++ code is similar&lt;br&gt;&lt;br /&gt;&lt;br /&gt;// handle&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://4song-downloads.blogspot.com/&gt;song downloads&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-2539820225505150136?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/2539820225505150136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/error-handling-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2539820225505150136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2539820225505150136'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/error-handling-in-c.html' title='Error handling in C++?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-4295999668430825434</id><published>2009-07-12T22:46:00.000-07:00</published><updated>2009-07-12T22:46:01.543-07:00</updated><title type='text'>Getting a wierd error that I cant seem to fix when compiling my C Program?</title><content type='html'>Ok so I'm trying to make a program with a function that will raise X to the K power, in the main function I want it to go from -4 to 4....I think im doing everything write but compiler says no....any tips?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;%26lt;code%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#define X 10&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#define K -4&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#define END 4&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;double RaiseRealToPower(double X, double K);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt; &lt;br&gt;&lt;br /&gt;&lt;br /&gt; int i, END;&lt;br&gt;&lt;br /&gt;&lt;br /&gt; printf("k %20lg", X);&lt;br&gt;&lt;br /&gt;&lt;br /&gt; for(i = K; i %26lt;= END; i++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt; {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  printf("%d %20.10lf\n", i, RaiseRealToPower(double X, double K));&lt;br&gt;&lt;br /&gt;&lt;br /&gt; }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;  double RaiseRealToPower(double X, double K){&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   double answer, X, K;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   if(K %26lt; 0){&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   answer = 1 / (pow(X, K));&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   answer = pow(X, K);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;   return (answer);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;%26lt;/code%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;%26lt;errors%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;hw04.2.c:9: error: syntax error before numeric constant&lt;br&gt;&lt;br /&gt;&lt;br /&gt;hw04.2.c: In function `main':&lt;br&gt;&lt;br /&gt;&lt;br /&gt;hw04.2.c:13: error: syntax error before numeric constant&lt;br&gt;&lt;br /&gt;&lt;br /&gt;hw04.2.c:17: error: syntax error before "double"&lt;br&gt;&lt;br /&gt;&lt;br /&gt;hw04.2.c: At top level:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;hw04.2.c:21: error: syntax error before numeric constant&lt;br&gt;&lt;br /&gt;&lt;br /&gt;hw04.2.c: In function `RaiseRealToPower':&lt;br&gt;&lt;br /&gt;&lt;br /&gt;hw04.2.c:22: error: syntax error before numeric&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Getting a wierd error that I cant seem to fix when compiling my C Program?&lt;br&gt;Line "int i, END;"&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Translates to "int i, 4;"&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Which is not legal. Remove END from this line.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Line 'printf("%d %20.10lf\n", i, RaiseRealToPower(double X, double K));"&lt;br&gt;&lt;br /&gt;&lt;br /&gt;You do not call a function by defining the type. Try.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;printf("%d %20.10lf\n", i, RaiseRealToPower( X,  K));&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Line "double RaiseRealToPower(double X, double K){"&lt;br&gt;&lt;br /&gt;&lt;br /&gt;X and K are defined to be 10 and -4. Use another name. Try&lt;br&gt;&lt;br /&gt;&lt;br /&gt;double RaiseRealToPower(double x, double y){&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;In the function RaiseRealToPower. Replace X and K with x and y so that the varables match the new declaration. Case matters, I mean lower case X.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;You rewrite answer created within the if statement because you assign an answer unconitionally after the if (No else statement).&lt;br&gt;Reply:fist of all you defined END twice&lt;br&gt;&lt;br /&gt;&lt;br /&gt;END is already a constant which is defined in 3rd line (#define END 4). why did you define is again in 9th line (int 1, END)?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;fix that first see if it works&lt;br&gt;&lt;br /&gt;&lt;br /&gt;i'm too lazy to keep reading your code...  haha sorry&lt;br&gt;Reply:Why are you doing the following:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;x == X;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;y == K;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;You are setting local variables to constants.  Additionally, you aren't actually setting anything with these statements, but testing equality using '=='.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Okay, so your main loop is cycling based on i, but you never modify x and y, that is why your value never changes.  You should be incrementing one of those.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-4295999668430825434?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/4295999668430825434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/getting-wierd-error-that-i-cant-seem-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4295999668430825434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4295999668430825434'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/getting-wierd-error-that-i-cant-seem-to.html' title='Getting a wierd error that I cant seem to fix when compiling my C Program?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-2581209593194413330</id><published>2009-07-12T22:45:00.002-07:00</published><updated>2009-07-12T22:45:47.367-07:00</updated><title type='text'>How do you concatenate strings into a text box in C#?</title><content type='html'>I have a string called Month, a string called Balance, and a string called Interest. I want to put them together inside a textbox called Amortize.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;What's the correct syntax in c#?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;How do you concatenate strings into a text box in C#?&lt;br&gt;OK this is similar to my other answer.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;String temp;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;temp = Month + Balance + Interest;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Amortize.Text = temp;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;That should do the trick&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-2581209593194413330?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/2581209593194413330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-do-you-concatenate-strings-into.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2581209593194413330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2581209593194413330'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-do-you-concatenate-strings-into.html' title='How do you concatenate strings into a text box in C#?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-1019080371676399998</id><published>2009-07-12T22:45:00.001-07:00</published><updated>2009-07-12T22:45:28.744-07:00</updated><title type='text'>How do you pad a field with spaces in C# ?</title><content type='html'>I need a text field to take up 15 spaces whether there's anything in those spaces or not. (To make things align nicely)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;What's the correct syntax in C#?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I've been trying to use&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;textbox.Text = myField.ToString ("#,###,###.##");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;but it's not working, because if I concatenate that textbox with another textbox, any spaces that don't contain a number are ignored.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;How do you pad a field with spaces in C# ?&lt;br&gt;You probably want to do something like&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;string myString = "Hello World!";&lt;br&gt;&lt;br /&gt;&lt;br /&gt;textBox.Text = myString.PadLeft(15, ' ');&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Alternatively, why mess around with padding when you can just right-align the text box?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;textBox.TextAlign = HorizontalAlignment.Right;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;This way, you can use the values in the textbox without having to remove and then re-insert the padding.  Separate the data from the formatting.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-1019080371676399998?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/1019080371676399998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-do-you-pad-field-with-spaces-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1019080371676399998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1019080371676399998'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-do-you-pad-field-with-spaces-in-c.html' title='How do you pad a field with spaces in C# ?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-5933085849048525304</id><published>2009-07-12T22:45:00.000-07:00</published><updated>2009-07-12T22:45:12.433-07:00</updated><title type='text'>How do you concatenate strings in C#?</title><content type='html'>I need to concatenate three strings called Month, Balance, and Interest. What's the correct syntax in C#?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;How do you concatenate strings in C#?&lt;br&gt;the simplest answer to this would be simply doing the following&lt;br&gt;&lt;br /&gt;&lt;br /&gt;String trial ;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;trial =+ "what ever I want to add here";&lt;br&gt;&lt;br /&gt;&lt;br /&gt;trial =+ "here i add some more to the string";&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Hope this helps&lt;br&gt;Reply:using System.Text;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        StringBuilder sbStatement = new StringBuilder();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        sbStatement.Append(Month);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        sbStatement.Append(" ");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        sbStatement.Append(Balance);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        string strStatement = sbStatement.ToString();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;...                          &lt;span&gt;Report It&lt;/span&gt;&lt;br /&gt;                      &lt;br&gt;Reply:Hi, its me again. There is a Concat function of the String class or you can use the overloaded + operator.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;String.Concat(Month, Balance.ToString());&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;strVariable = Month + Balance.ToString() + Interest.ToString();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Hope this is what you were looking for.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://sending-flowers2.blogspot.com/&gt;sending flowers&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-5933085849048525304?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/5933085849048525304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-do-you-concatenate-strings-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/5933085849048525304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/5933085849048525304'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-do-you-concatenate-strings-in-c.html' title='How do you concatenate strings in C#?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-3551145699745718463</id><published>2009-07-12T22:44:00.003-07:00</published><updated>2009-07-12T22:44:56.864-07:00</updated><title type='text'>I have VERY LITTLE experience in C# using Microsoft Visual Studio! I want to go with linux!?</title><content type='html'>I heard about this Mono thing and they say that is a C#  for Linux! Where Do i download the Compiler from and I want to know if the language has the same syntax as C#! Is an application in Mono compatible with Windows XP?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;pls answer&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;I have VERY LITTLE experience in C# using Microsoft Visual Studio! I want to go with linux!?&lt;br&gt;I don't mean to be insulting, but is Google not working for you?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;http://www.google.com/search?q=mono&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The *first* result gets you what you want. You are expected to do your own reading, as a programmer. Learn to Google and *read* the materials.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;%26gt; I heard about this Mono thing and they say that is a C# for Linux!&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Sort of. The C# specifications are open. So it is possible to try and recreate them on Linux, to an extent. C# is very much tied to Microsoft and Windows though, so if you really want to work with C#, it's not going to be on Linux.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;%26gt; Where Do i download the Compiler from&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The first google result.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;%26gt; I want to know if the language has the same syntax as C#&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Yes. It only goes up to C# .NET 1.0, while Microsoft is on 2.0.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;%26gt; Is an application in Mono compatible with Windows XP?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Not completely. To an extent you can write compatible apps, but I don't think any serious programmer would bet on cross-portability. Look through the Mono site for a more detailed explanation.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;If you want C# like code on Linux, Mono is the way to go. But it isn't anywhere near as nice as C# on Windows.&lt;br&gt;Reply:Yes mono programs written in Linux works with XP as well. I have written code in MONO and it works cross platform. I have put below the link to the Mono project.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-3551145699745718463?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/3551145699745718463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/i-have-very-little-experience-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3551145699745718463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3551145699745718463'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/i-have-very-little-experience-in-c.html' title='I have VERY LITTLE experience in C# using Microsoft Visual Studio! I want to go with linux!?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-5966935617564387248</id><published>2009-07-12T22:44:00.002-07:00</published><updated>2009-07-12T22:44:40.309-07:00</updated><title type='text'>Game Idea C++ help with map?</title><content type='html'>I have a plan to create a simple interactive video game with c++. The game will have no graphics except ASCII characters. I wanted to initialize a map and have mountains return a char value of '^', grass a char value of '.'. The character will be a '@'.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I've only been studying the basic syntax of c++ and have yet to get into the actual implementation of this syntax to create something worthwhile and enjoyable.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;My problem however is defining a map, and when defining the map how will the character move within it. How can I create a map that will define an x and y environment in which if my character presses 'w' on the keyboard he'll move north or y+1. Have 'a' move me x - 1 and etc.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Should I use a structure? A multi-dimensional array? If you answer could you please give me some detailed instructions as well. And as always any help would be greatly appreciated. Thanks. :)&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Game Idea C++ help with map?&lt;br&gt;I would use a 2D array, and make the number of columns and rows configurable, like this:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;class Map&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;private:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;char* map;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int numCols, numRows;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int charPositionX, charPositionY;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;public:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Map(int columns, int rows) : numCols(columns), numRows(rows), charPositionX(0), charPositionY(0)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;map = new char[rows][columns];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void setCharPos(int x, int y)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;// do some bounds checking&lt;br&gt;&lt;br /&gt;&lt;br /&gt;charPositionX = x;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;charPositionY = y;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;char getMapChar(int x, int y)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;// do some bounds checking&lt;br&gt;&lt;br /&gt;&lt;br /&gt;return map[y * numRows + x];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void getMapRow(int y, char* rowOut)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;// do some bounds checking, and null checking&lt;br&gt;&lt;br /&gt;&lt;br /&gt;// or use a std::string reference here to avoid&lt;br&gt;&lt;br /&gt;&lt;br /&gt;// buffer overruns&lt;br&gt;&lt;br /&gt;&lt;br /&gt;memcpy(rowOut, map[y * numRows], numCols);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void moveCharUp()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;if (charPositionX %26gt; 0)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;charPositionX--;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void moveCharDown()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;if (charPositionX %26lt; (numRows - 1))&lt;br&gt;&lt;br /&gt;&lt;br /&gt;charPositionX++;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;//and so forth&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;};&lt;br&gt;Reply:for this you would use a Multi dimentional array...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Depending on how you want to code it you can use that to define the landscape. This could be a predefinded landscape or one generated at runtime....&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;then as the object moves accross you can use its coordinates with the landscape'd data for that position and perform the nessesary function...&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-5966935617564387248?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/5966935617564387248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/game-idea-c-help-with-map.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/5966935617564387248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/5966935617564387248'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/game-idea-c-help-with-map.html' title='Game Idea C++ help with map?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-1600712308012624766</id><published>2009-07-12T22:44:00.001-07:00</published><updated>2009-07-12T22:44:24.260-07:00</updated><title type='text'>If C# is a newer version of C++, why do most colleges and school s still teach C++?</title><content type='html'>In your option which is better?? Does C# have more syntax than C++? Or is it about the same thing as C and C++?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;If C# is a newer version of C++, why do most colleges and school s still teach C++?&lt;br&gt;Both languages have their place.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Both languages are commonly used.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Syntax is very similar.  They are also very similar in syntax to JAVA.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;All c-based languages have similiarites.   I can copy C# over to JAVA and most likely not have a compile issue.  Except, if I started using libraries only avaialble in .NET&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Where most people have an issue with one over the other is their familiarity with the base libraries.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Where I work we use JAVA, C#, and C++&lt;br&gt;&lt;br /&gt;&lt;br /&gt;There are two-sides of the fence for programming preferences either JAVA or C#&lt;br&gt;&lt;br /&gt;&lt;br /&gt;C++ is not preferred for programming, because we're lazy.  It just happens to be the ideal langauge for many of the things we need to accomplish.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Why Java or C# - really it doesn't matter.  You really just have to know how to write good clean code.  My coworkers pick a side between JAVA or C# because they don't know the other languages libraries.  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Myself - I'm a C# programmer.  I can write a webservice in C# in no time.  Ask me to do it in JAVA and I'd have to look at exisitng code or my book.  In about 3-5 minutes, I can tell you.  I just forget the process.  C# I have it engrained in my head.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;So why one over the other in education.   C++ is a good language to start people on the basic understanding of how to write good, clean, and efficient code.  Not to mention - you have to know how to allocate memory - which you forget about in C# or JAVA you can have problems because the garbage collection might not happen quick enough.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I believe C only has 23 commands - the rest are libraries - so I'd also say it's a good building block.  Like learning to add before you multiply.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Anyway, don't be dismayed - it's very important to know C++ &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Don't forget there are many other languages out there too... it's good to know what languages are good for what purpose.&lt;br&gt;Reply:it is (c#) a microsoft's avtaar of Java.&lt;br&gt;Reply:C# is not a newer version of C++. It is an object-oriented programming language developed by Microsoft as part of their .NET initiative. Microsoft based C# on C++ and Java.&lt;br&gt;Reply:If it isn't broken don't try to fix it.&lt;br&gt;Reply:Answer is simple C is base of C++ and C++ is the Base of C#.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;so most of the colleges teach C before C++ and C++ before C#.&lt;br&gt;Reply:Because C++ is still the best.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Newer isn't always better and Microsoft is always making it's own versions of things that have already been done first by someone else.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;They weren't even the first to create the windows style user interface.&lt;br&gt;Reply:In my opinion, C# is not a new version of C++. The two languagues differ each other significantly, and in my personal opinion, C# is more of a Microsoft version of Java.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;So, if you are talking about system level programing, the choice would still remain a hybrid of C and C++, rather then C# (which requires .NET and CLR to run).&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Further, I am not sure if C# is truly platform independent, which C++ and C are&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-1600712308012624766?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/1600712308012624766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/if-c-is-newer-version-of-c-why-do-most.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1600712308012624766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1600712308012624766'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/if-c-is-newer-version-of-c-why-do-most.html' title='If C# is a newer version of C++, why do most colleges and school s still teach C++?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-2209728823933057436</id><published>2009-07-12T22:44:00.000-07:00</published><updated>2009-07-12T22:44:09.818-07:00</updated><title type='text'>C++: Adding user inputs into a C-String Array?</title><content type='html'>Here's my program:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;iostream%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;iomanip%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;using namespace std;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void main ()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt; char name_list[9];  //10 names max&lt;br&gt;&lt;br /&gt;&lt;br /&gt; &lt;br&gt;&lt;br /&gt;&lt;br /&gt; cout%26lt;%26lt;"Enter Name: ";&lt;br&gt;&lt;br /&gt;&lt;br /&gt; cin.get(name_list[0], 100);&lt;br&gt;&lt;br /&gt;&lt;br /&gt; cout%26lt;%26lt;endl;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Here's the error:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;error C2664: 'class std::basic_istream%26lt;char,struct std::char_traits%26lt;char%26gt; %26gt; %26amp;__thiscall std::basic_istream%26lt;char,struct std::char_traits%26lt;char%26gt; %26gt;::get(char *,int)' : cannot c&lt;br&gt;&lt;br /&gt;&lt;br /&gt;onvert parameter 1 from 'char' to 'char *'&lt;br&gt;&lt;br /&gt;&lt;br /&gt;        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;------&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I'm pretty new to C++ and I know this must be something very basic about syntax or C-String.  I DON'T want to replace the c-string array with a "string" (i.e.: string name_list[] instead of char name_list[])&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I've been working on this all day - been trying to find help online online, but this seems to be too simple of a mistake that it's not online.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;C++: Adding user inputs into a C-String Array?&lt;br&gt;3paul is correct.  It would be much easier if you simply use the Standard Library class 'string'.  I don't understand why you don't want to use it, unless your instructor is forbidding it.  I'm also confused with your term C-String.  It sounds like the MFC class CString (which you should not be using).&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;If you do use the Standard Library class string, you can simply declare an array of string:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;string name_list[10];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;// your stuff&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cin %26gt;%26gt; name_list[0];&lt;br&gt;&lt;br /&gt;&lt;br /&gt;// etc.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Even better, if you use the template vector, you can have a variable sized array:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;vector%26lt;string%26gt; name_list;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;string input;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;do {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout %26lt;%26lt; "Enter name (blank to stop)\n";&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cin %26gt;%26gt; input;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;if (!input.empty())&lt;br&gt;&lt;br /&gt;&lt;br /&gt;name_list,push_back(input);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;while (!input.empty());&lt;br&gt;Reply:char name_list[9]; does not create an array of 10 character strings.  It's an array of 9 (not 10)  characters. Period.  So when you reference name_list[0] in the cin.get call, you're referencing a char, not a char*.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Now, char* name_list[9] would create an array of nine character pointers, but they wouldn't automatically point to character strings either.  That's more detail you'd have to work out.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Hope that helps some.&lt;br&gt;Reply:You have name_list as something like a "string" right now instead of an array of "strings."  Try char name_list[9][100].  &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;But you can just do this with std::string which would make your life much simpler, and you're using the newer standard library stuff anyway so shouldn't make much of a difference in overhead.  You'd probably prefer to just go that route.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://4send-flowers.blogspot.com/&gt;send flowers&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-2209728823933057436?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/2209728823933057436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-adding-user-inputs-into-c-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2209728823933057436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2209728823933057436'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-adding-user-inputs-into-c-string.html' title='C++: Adding user inputs into a C-String Array?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-8029547926897360175</id><published>2009-07-12T22:43:00.003-07:00</published><updated>2009-07-12T22:43:56.864-07:00</updated><title type='text'>C++ questions, cansomeone please?</title><content type='html'>why? i just need a short answer... thanks&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;a) Omitting the semicolon at the end of a statement is a syntax error. why?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;b) All variables in a program must be declared before they are used. why?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;c) A syntax error will occur if any of the operators ==, !=, %26gt;=, and %26lt;= appears with spaces between its pair of symbols. why?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;d) Forgetting to include the iostream file in a program that input data from the keyboard or outputs data to the screen causes a compiler error. why?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;e) C++ considers the variables number1 and numbeR1 to be identical?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;f) The following identifiers are all valid variable names: _num1_, num_1, a123,&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int1, a2a, z22, z2z, 2z2, zzz, because?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;thanks... i just really need to compare answers :)&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;C++ questions, cansomeone please?&lt;br&gt;a) Yes, you're right, many languages use semi-colons and such as statement separators whereas they are absolutely required at the end of every statement in C, even if it's the last one in the file.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;b) Right again, because this helps to identify typos basically and finding bugs due to misspellings of variable names can be a real headache in languages that do not require declaration.   But you can use variables in C++ immediately even in the same statement where they are declared, so this isn't arduous or a big negative.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;c) Right, because "=" has a meaning different from "==" etc etc, just like "%26gt;" has a meaning different from "%26gt;=" so there's no way to tell what the programmer means if you allow "%26gt; =" as a way of saying "%26gt;=", or at least it makes the compiler's job much more difficult.  C++ does have to be processed by a compiler.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;d) Right, because C and C++ have always been relatively unique in being defined strictly as languages, meaning that "print" functions and such are responsibilities "offloaded" to library functions.  So there is no built in idea of "print" like there is in many languages.  You have to bring in a library to do that.  This is a good thing in my opinion and is one of the things that makes C/C++ usable in all contexts...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;e) No, wrong.  number1 and numbeR1 are different names and different variables.  You can't refer to number1 using "numbeR1".&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;f) Yeah, I think so, what's the problem?  You don't like those names?  You think the language should somehow mandate people using variable names that you like?  You think variables should have to have more than 3 characters?  Many programmers like to use "a" "b" and "c" in some stretches of code, you have a problem with that?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Hope that helps!&lt;br&gt;Reply:you said "a" short answer, well do you really expect anyone to spend half the night trying to find if your questions are valid and if so answering them? or do you want a bunch of jiberish?&lt;br&gt;Reply:I started to put semicolons at the end of my English sentences because I'm so used to it;&lt;br&gt;Reply:1) every c++ program has a specific syntax that the comp understands or you can say that designers have designed in that way.it is the same as when you end a sentence you put a full stop you cant question why we do it right.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;2)if we do not declare the variables before had how the comp would know what data type it has.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;3)the c++ takes a space also as a character.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;4)c++ has some inbuilt functions like iostream.h,conio.h when we use commands like getch() we need these functions.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;5)a variable name:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;-%26gt;must begin with a letter or underscore&lt;br&gt;&lt;br /&gt;&lt;br /&gt;-%26gt;may contain alphabets and underscore symbol&lt;br&gt;&lt;br /&gt;&lt;br /&gt;-%26gt;must not contain any other character or symbol&lt;br&gt;&lt;br /&gt;&lt;br /&gt;-%26gt;may be of any length&lt;br&gt;&lt;br /&gt;&lt;br /&gt;-%26gt;must not be a keyword&lt;br&gt;&lt;br /&gt;&lt;br /&gt;-%26gt;must contain a type specifier preceding a variable name.&lt;br&gt;Reply:Thats hard.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-8029547926897360175?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/8029547926897360175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-questions-cansomeone-please.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8029547926897360175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8029547926897360175'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-questions-cansomeone-please.html' title='C++ questions, cansomeone please?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-1879497671586288643</id><published>2009-07-12T22:43:00.002-07:00</published><updated>2009-07-12T22:43:37.766-07:00</updated><title type='text'>In c# which function is used to check whether a character is present in a string. give the syntax of function?</title><content type='html'>int iPos= strSource.IndexOf(strToFind);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;if ( iPos != -1 )&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;      // found strToFind (which could be just a single character) inside strSource.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;In c# which function is used to check whether a character is present in a string. give the syntax of function?&lt;br&gt;I believe it's IndexOf();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;tempString.indexOf(character);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Returns -1 if it isn't in there anywhere.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-1879497671586288643?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/1879497671586288643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/in-c-which-function-is-used-to-check.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1879497671586288643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1879497671586288643'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/in-c-which-function-is-used-to-check.html' title='In c# which function is used to check whether a character is present in a string. give the syntax of function?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-7160420292299055734</id><published>2009-07-12T22:43:00.001-07:00</published><updated>2009-07-12T22:43:20.675-07:00</updated><title type='text'>How do i creat create a syntax of a small imperative programming language&amp;implement a parser for it in c++?</title><content type='html'>check out Yacc and lex (or their gnu counterparts, flex and bison). It is fairly easy to describe your own syntax with the lex/yacc combination. The you write the handlers to process the expressions.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-7160420292299055734?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/7160420292299055734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-do-i-creat-create-syntax-of-small.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/7160420292299055734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/7160420292299055734'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-do-i-creat-create-syntax-of-small.html' title='How do i creat create a syntax of a small imperative programming language&amp;amp;implement a parser for it in c++?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-6232234323188286936</id><published>2009-07-12T22:43:00.000-07:00</published><updated>2009-07-12T22:43:04.653-07:00</updated><title type='text'>How to create a c++ program to get the most accurate value of Pi...? i mean the syntax....not the output.,.,?</title><content type='html'>Need #include%26lt;math.h%26gt; header. Then you can use&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt; double pi = M_PI; &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;to access pi.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://1quince.blogspot.com/&gt;quince&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-6232234323188286936?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/6232234323188286936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-to-create-c-program-to-get-most.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6232234323188286936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6232234323188286936'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/how-to-create-c-program-to-get-most.html' title='How to create a c++ program to get the most accurate value of Pi...? i mean the syntax....not the output.,.,?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-6155468852276776867</id><published>2009-07-12T22:42:00.003-07:00</published><updated>2009-07-12T22:42:48.424-07:00</updated><title type='text'>In my turbo C++...as i complie my program...the error comes as the Declaration syntax error,plz help 2 fix it.</title><content type='html'>is this problem because of my directories...or is it an error in the IOSTREAM....&lt;br&gt;&lt;br /&gt;&lt;br /&gt;there were many Declaration errors only for iostream...&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;In my turbo C++...as i complie my program...the error comes as the Declaration syntax error,plz help 2 fix it.&lt;br&gt;The 1st line with the include is incorrect.  Instead of 'Include' it should be 'include'  Remember that the compiler is case-sensitive.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Which compiler are you using and for which operating system?  The screen clearing function, clrscr() is defined in CONIO.H in my Borland C++ DOS compiler, but that function doesn't exist in CONIO.H on my Microsoft C++ Windows compiler.  If the 'clrscr();' line is giving you an 'undeclared identifier' error, then remove it.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The rest of the program is fine.  Make sure that the compiler is set to create a C++ program, not C.  Save your source file with the .cpp file extension.  You might also want to look through the compiler settings.&lt;br&gt;Reply:well it's pretty difficult to say any thing without seeing the actual code.....if you would have added your code right here then it would be a lot easier to handle...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;any way the declaration errors mainly occur that when u ommit to declare a variable or u declare it with wrong data type..etc.....&lt;br&gt;Reply:sign your variants one by one . and give to them zero value&lt;br&gt;Reply:turbo c++ command different from visual c++ command&lt;br&gt;&lt;br /&gt;&lt;br /&gt;and maybe you want this:-&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include%26lt;conio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include%26lt;stdio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;clrscr();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int a,b,c;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;printf("\n enter a value for a:");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;scanf("%i",%26amp;a);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;printf("\n enter a value for b:");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;scanf("%i",%26amp;b);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;c=a+b;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;printf("\n the value for c is: %i",c);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;getch();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-6155468852276776867?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/6155468852276776867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/in-my-turbo-cas-i-complie-my-programthe.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6155468852276776867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6155468852276776867'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/in-my-turbo-cas-i-complie-my-programthe.html' title='In my turbo C++...as i complie my program...the error comes as the Declaration syntax error,plz help 2 fix it.'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-1931600283820642936</id><published>2009-07-12T22:42:00.002-07:00</published><updated>2009-07-12T22:42:32.291-07:00</updated><title type='text'>Derive the regular grammar to describe the syntax of a conventional representation of do-while statement in c.</title><content type='html'>do{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;............&lt;br&gt;&lt;br /&gt;&lt;br /&gt;//body&lt;br&gt;&lt;br /&gt;&lt;br /&gt;............}while(condition);&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Derive the regular grammar to describe the syntax of a conventional representation of do-while statement in c.&lt;br&gt;Been out of touch with the dragon book.  Here is a try though.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;DO_WHILE: do [whitespace+] {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;[whitespace+]statement*&lt;br&gt;&lt;br /&gt;&lt;br /&gt;[whitespace+]&lt;br&gt;&lt;br /&gt;&lt;br /&gt;} [whitespace+] while( expression );&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Look at the appendix of The C programming Language book by Kernighan and Ritchie.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-1931600283820642936?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/1931600283820642936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/derive-regular-grammar-to-describe.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1931600283820642936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1931600283820642936'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/derive-regular-grammar-to-describe.html' title='Derive the regular grammar to describe the syntax of a conventional representation of do-while statement in c.'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-4049804855089692149</id><published>2009-07-12T22:42:00.001-07:00</published><updated>2009-07-12T22:42:20.995-07:00</updated><title type='text'>Programming C# by examples?</title><content type='html'>I want to learn to make desktop applications. Can anyone recommend a book or tutorials where I can learn from examples?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I don't want a book with C# syntax. I want one with practical examples on how to build GUI and add code to save and open data to a file or use a database.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Programming C# by examples?&lt;br&gt;http://www.about.com   &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;and then go to the channels and computers and then look for programming&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;do i get 10 pts&lt;br&gt;Reply:I gave alexander good rating But I prefer TJ's answer                          &lt;span&gt;Report It&lt;/span&gt;&lt;br /&gt;                      &lt;br&gt;Reply:i still got 10 pts so i dont care                          &lt;span&gt;Report It&lt;/span&gt;&lt;br /&gt;                      &lt;br&gt;Reply:Erik Brown's book "Windows Forms in Action : Second Edition of Windows Forms Programming with C#" is excellent.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;"The book is a tutorial, leading the reader through Windows application development using C# and Visual Studio .NET. It illustrates how the classes in the .NET Framework interact in a fully functional application."&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The book takes you through the process of building a single, robust application.&lt;br&gt;Reply:there's these amazing tutorials that i learnt c# in. hope they help you!&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-4049804855089692149?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/4049804855089692149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/programming-c-by-examples.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4049804855089692149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4049804855089692149'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/programming-c-by-examples.html' title='Programming C# by examples?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-6290924890884590404</id><published>2009-07-12T22:42:00.000-07:00</published><updated>2009-07-12T22:42:05.461-07:00</updated><title type='text'>C++ and Libraries(DLL's)?</title><content type='html'>http://www.learncpp.com/cpp-tutorial/a1-...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I need a tutorial such as this but much more in depth with examples on more than one. I have learned C++ syntax already.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;C++ and Libraries(DLL's)?&lt;br&gt;depending on your compiler, it can be a manual process or not, if you're using Borland Builder or MSVS there should be a dll wizard otherwise you'll have to write it manually.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;MSVC - http://logix4u.net/Programming/vc++/A_Tu...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Borland Builder - Look at the help files&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;another link http://wiki.tcl.tk/2419&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;All dll have similar entry points, so seeing enough code shold give you the basic idea&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://2garden-centre.blogspot.com/&gt;garden centre&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-6290924890884590404?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/6290924890884590404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-and-librariesdlls.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6290924890884590404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/6290924890884590404'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/c-and-librariesdlls.html' title='C++ and Libraries(DLL&apos;s)?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-5131453534477895627</id><published>2009-07-12T22:41:00.001-07:00</published><updated>2009-07-12T22:41:46.725-07:00</updated><title type='text'>Different destructors in C++?</title><content type='html'>Is there a reason why there is only one destructor per class in C++? Is there a reason why constructors and destructors aren't paired? C++ automatically creates a default AND a copy-constructor, but there is only one, default destructor. Why isn't it possible to have destructors matching constructors? For example, if I declared a constructor for class X:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;X(int, double);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;why can't I also declare (and define) a matching destructor, e.g.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;~X(int, double);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;which would be called only for destructing objects created using the matched constructor above? Please, only serious answers by C++ experts! I know current C++ syntax does not support it, my question is WHY?&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Different destructors in C++?&lt;br&gt;Just suppose, that it's possible. It would means that different objects of the same class have different way to perform the same task (release their resource, clean up , etc). It mean that they have different behavior, which is the antithesis of a class.  If that task need to be performed differently based on its construction, maybe some other methods should be done differently too. If object need to behave differently, they need not be instance of the same class. It would also cause an instance and its identical clone (constructed via a copy constructor) to be destroyed differently...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Suppose you have an array of instance of class X,  you couldn't call delete[] on it, you would have to give the correct parameters for each X in the array, without even knowing how they were constructed and how many parameters were required for their construction.  Would you have the compiler add a secret member to remember which kind of object X each instance is, so that the correct destructor could be virtually called based on the value of this member? Actually what would be the meaning of the parameter received by the destructor? And who would provide this value?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;The reality is that once constructed, all instance should provide the same interface.  Constructors perform the conversion (something) -%26gt; yourClass, and this may be performed differently based on the something.  Destructor on the other hand perform the task (yourClass -%26gt; void) and this require no other input on your part.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Hope this help&lt;br&gt;Reply:What purpose would it serve?  There could be many ways to create an object, but, when you are done with that object, why would you need several ways to destroy it?  You either want the object or you don't.&lt;br&gt;Reply:If there were more than 1 destructor, how would the compiler know which one to call?  Constructors and destructors are paired, every class gets one of each, even if you don't implicitly declare a constructor / destructor the compiler automatically generates one to take care of member variables.  Destructors are parameterless, this is by compiler design.  I think it's bad form to allow a user to force a class to take a parameter when being destroyed.  Better to provide a function for that, i.e. myClass.cleanup(myObject);  Or, inside the class, if you destructor could branch, make the destructor figure out how to deallocate itself.  It's much easier to just say 'delete myClass;' than to try and figure out how it's supposed to be destroyed.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-5131453534477895627?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/5131453534477895627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/different-destructors-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/5131453534477895627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/5131453534477895627'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/different-destructors-in-c.html' title='Different destructors in C++?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-1082619130135364645</id><published>2009-07-12T22:41:00.000-07:00</published><updated>2009-07-12T22:41:30.029-07:00</updated><title type='text'>Regarding  c and c++?</title><content type='html'>where can i get free c and C++ syntax for free websites plzzzz&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Regarding  c and c++?&lt;br&gt;http://dreamincode.net&lt;br&gt;Reply:try the "www.wikipedia.com" &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;it wil be  useful 4r u&lt;br&gt;Reply:search for google.. &lt;br&gt;&lt;br /&gt;&lt;br /&gt;if ur a starter then read C guide of Mr.Beej its really good&lt;br&gt;&lt;br /&gt;&lt;br /&gt;http://www.beej.us/guide/bgc/&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;ther are bunch of tutorials for both C n C++ on internet :-)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;good luck..&lt;br&gt;Reply:see be very frank dont try to search this thing on web, because after getting all programs, you will become more confused. see on net , people post , or at web sites the program you find will be very complex and will confuse you.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;they are not in proper sequence, etc some time dont have header files etc, like this, there are many propblems YYAAA. but it can help you in another way. you will get an idea that what kind of programming can be done in c , c++.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;you just open any c++ book and start doing RnD on your computer. or purchase SAMS teach yourself C++ book.&lt;br&gt;Reply:www.thefreecountry.com/sourcecode/cpp.sh...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Try with google with the tag "c and c++ source codes" for more websites&lt;br&gt;Reply:just type c c++ tutorials on google and you will go mad with the number of tutorials you will get..try it..&lt;br&gt;Reply:"C and C++ syntax"?  I assume you want the grammar for those languages?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Look here:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;http://www.thefreecountry.com/sourcecode...&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-1082619130135364645?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/1082619130135364645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/regarding-c-and-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1082619130135364645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1082619130135364645'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/regarding-c-and-c.html' title='Regarding  c and c++?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-4224255672023864928</id><published>2009-07-09T06:03:00.003-07:00</published><updated>2009-07-09T06:03:56.127-07:00</updated><title type='text'>Converting MS Visual Basic codes to MS Visual C++ codes?</title><content type='html'>How can i convert MS visual basic codes to Visual c++ codes?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I know that they have the same logic, but their syntax isn't. Can somebody tell me the equivalent c++ syntax in visual basic syntaxes?&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;If you want, you may tell me a good resource site for my problem...&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I need help  ASAP&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;thanks!&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Converting MS Visual Basic codes to MS Visual C++ codes?&lt;br&gt;If you already know the VB, then use the first URL below to give it a go.  If not, then you might find some useful tutorials linked from the second URL below.  Good luck!&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-4224255672023864928?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/4224255672023864928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/converting-ms-visual-basic-codes-to-ms.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4224255672023864928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/4224255672023864928'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/converting-ms-visual-basic-codes-to-ms.html' title='Converting MS Visual Basic codes to MS Visual C++ codes?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-3682597239819432705</id><published>2009-07-09T06:03:00.002-07:00</published><updated>2009-07-09T06:03:40.177-07:00</updated><title type='text'>I want the syntax of any game that can be made in c++ for project.pls sum1 send 1!?</title><content type='html'>Check out Nethack. Open source and all, you know.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;I want the syntax of any game that can be made in c++ for project.pls sum1 send 1!?&lt;br&gt;do your own homework&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://2flower-show.blogspot.com/&gt;flower show&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-3682597239819432705?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/3682597239819432705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/i-want-syntax-of-any-game-that-can-be.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3682597239819432705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/3682597239819432705'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/i-want-syntax-of-any-game-that-can-be.html' title='I want the syntax of any game that can be made in c++ for project.pls sum1 send 1!?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-8607753125611615570</id><published>2009-07-09T06:03:00.001-07:00</published><updated>2009-07-09T06:03:28.375-07:00</updated><title type='text'>What is the syntax for writing P=A(1+r)^n in 'C' language?</title><content type='html'>#include%26lt;math.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;         float P,A,r,n;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;         Printf("Enter Amount : ");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;         scanf("%f",%26amp;A);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;         Printf("\nEnter Rate : ");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;         scanf("%r",%26amp;r);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;         Printf("\nEnter Time : ");&lt;br&gt;&lt;br /&gt;&lt;br /&gt;         scanf("%f",%26amp;t);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;         P = A * pow(1+r,n);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;         printf(" \nValue of P = ",P);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;What is the syntax for writing P=A(1+r)^n in 'C' language?&lt;br&gt;#include%26lt;stdio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include%26lt;conio.h%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;void main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt; int p,r,n,a,i;&lt;br&gt;&lt;br /&gt;&lt;br /&gt; clrscr();&lt;br&gt;&lt;br /&gt;&lt;br /&gt; printf("Input the value of r: ");&lt;br&gt;&lt;br /&gt;&lt;br /&gt; scanf("%d",%26amp;r);&lt;br&gt;&lt;br /&gt;&lt;br /&gt; printf("\n\nInput the value of n: ");&lt;br&gt;&lt;br /&gt;&lt;br /&gt; scanf("%d",%26amp;n);&lt;br&gt;&lt;br /&gt;&lt;br /&gt; printf("\n\nInput the value of A: ");&lt;br&gt;&lt;br /&gt;&lt;br /&gt; scanf("%d",%26amp;a);&lt;br&gt;&lt;br /&gt;&lt;br /&gt; p=1;&lt;br&gt;&lt;br /&gt;&lt;br /&gt; for(i=1;i%26lt;=n;i++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;  p=p*(1+r);&lt;br&gt;&lt;br /&gt;&lt;br /&gt; p=p*a;&lt;br&gt;&lt;br /&gt;&lt;br /&gt; printf("\n\nA(1+r)^n=P=%d",p);&lt;br&gt;&lt;br /&gt;&lt;br /&gt; getch();&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;Reply:first include math.h file then use the following statement in the program&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;p=a*(pow((1+r),n))&lt;br&gt;Reply:the answer is 4&lt;br&gt;Reply:This may help you %26amp; reduce the size of your code&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int Pow(int r, int n)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;     int temp;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;     int i;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;     int x = temp = r;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;     for(i = 1; i %26lt; n; i++)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;     {&lt;br&gt;&lt;br /&gt;&lt;br /&gt;          temp = temp * x;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;     }&lt;br&gt;&lt;br /&gt;&lt;br /&gt;     return temp;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;call it this way from your main function&lt;br&gt;&lt;br /&gt;&lt;br /&gt;p = A * Pow((1+r), n);&lt;br&gt;Reply:P = A * pow(1+r, n);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Where 'pow' is in math.h&lt;br&gt;Reply:First include math.h&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;then using your logic write the equation in C syntax as:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt; P = A * pow(1+r, n);&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt; pow is a power function it means the same that you want.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;I hope you are satisfied.&lt;br&gt;Reply:copy and paste the following code in your editor and compile it.&lt;br&gt;&lt;br /&gt;&lt;br /&gt;P=A*pow((1+r),n).&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-8607753125611615570?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/8607753125611615570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-syntax-for-writing-pa1rn-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8607753125611615570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/8607753125611615570'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/what-is-syntax-for-writing-pa1rn-in-c.html' title='What is the syntax for writing P=A(1+r)^n in &apos;C&apos; language?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-2563744625472351996</id><published>2009-07-09T06:03:00.000-07:00</published><updated>2009-07-09T06:03:14.773-07:00</updated><title type='text'>I need help with C++! I AM GETTING THREES LIKE THESE: Error1error C2143: syntax error : missing ';' before '&lt;&lt;</title><content type='html'>I DON'T KNOW how to fix them!! help please!!&lt;br&gt;&lt;br /&gt;&lt;br /&gt;this is my code:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;iostream%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;string%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;iomanip%26gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;#include %26lt;cctype%26gt; &lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;using namespace std;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int main()&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{ &lt;br&gt;&lt;br /&gt;&lt;br /&gt;//declare variables&lt;br&gt;&lt;br /&gt;&lt;br /&gt;string itemNum = "";&lt;br&gt;&lt;br /&gt;&lt;br /&gt;int location = 0;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;//get input from user&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout %26lt;%26lt; "Enter an item number: " %26lt;%26lt; endl;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cin %26gt;%26gt; itemNum;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;//calculate shipping charge&lt;br&gt;&lt;br /&gt;&lt;br /&gt;while (itemNum != "x" %26amp;%26amp; itemNum != "X")&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;if (itemNum.length() != 5)&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout %26lt;%26lt; "The item number must contain five digits! " %26lt;%26lt; endl;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;else if( 'B' == toupper(itemNum[2])) %26lt;%26lt;- Added ')';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout %26lt;%26lt; "Your color is Blue" %26lt;%26lt;endl;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;} %26lt;%26lt;- Added '}'&lt;br&gt;&lt;br /&gt;&lt;br /&gt;else if ('G' == toupper(itemNum[2])) %26lt;%26lt;- Added ')';&lt;br&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout %26lt;%26lt; "the color is green" %26lt;%26lt; endl;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;} %26lt;%26lt;- Added '}'&lt;br&gt;&lt;br /&gt;&lt;br /&gt;else &lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout %26lt;%26lt; "Invalid item!" %26lt;%26lt;endl;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout %26lt;%26lt; "Enter an item number: " %26lt;%26lt; endl;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cin %26gt;%26gt; itemNum;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;} // Removed the extra }} and moved input within loop&lt;br&gt;&lt;br /&gt;&lt;br /&gt;return 0;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;} //end of main function&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;I need help with C++! I AM GETTING THREES LIKE THESE: Error1error C2143: syntax error : missing ';' before '%26lt;%26lt;&lt;br&gt;You need to delete the semi-colon at the end of this line:&lt;br&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;else if ('G' == toupper(itemNum[2])) %26lt;%26lt;- Added ')';&lt;br&gt;Reply:cout %26lt;%26lt; "Enter an item number: " %26lt;%26lt; endl;&lt;br&gt;&lt;br /&gt;&lt;br /&gt;becomes&lt;br&gt;&lt;br /&gt;&lt;br /&gt;cout %26lt;%26lt; "Enter an item number: ";&lt;br&gt;&lt;br /&gt;&lt;br /&gt;and so on&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-2563744625472351996?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/2563744625472351996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/i-need-help-with-c-i-am-getting-threes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2563744625472351996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2563744625472351996'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/i-need-help-with-c-i-am-getting-threes.html' title='I need help with C++! I AM GETTING THREES LIKE THESE: Error1error C2143: syntax error : missing &apos;;&apos; before &apos;&amp;lt;&amp;lt;'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-2727459773953745201</id><published>2009-07-09T06:02:00.003-07:00</published><updated>2009-07-09T06:02:59.211-07:00</updated><title type='text'>Give me short clear description about OOP syntax. with examples!?</title><content type='html'>i want  a clear understand about C++ syntax and how they exicute. with some examples. not easy damn one. really complex example.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a1.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;Give me short clear description about OOP syntax. with examples!?&lt;br&gt;http://www.cs.cornell.edu/courses/cs100/...&lt;br&gt;Reply:Search the internet for C++ resources. You will find one soon enough that you understand and are comfortable with. Different examples suit different people and different levels of skill, so just finding an arbitrary complicated piece of C++ would probably not be of much use to you.&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-2727459773953745201?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/2727459773953745201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/give-me-short-clear-description-about.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2727459773953745201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/2727459773953745201'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/give-me-short-clear-description-about.html' title='Give me short clear description about OOP syntax. with examples!?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-63435307938471569.post-1705965121186784153</id><published>2009-07-09T06:02:00.002-07:00</published><updated>2009-07-09T06:02:37.659-07:00</updated><title type='text'>I want to have the syntax of a tic tac toe game from c++ without visual basic.?</title><content type='html'>i need it for my hw.ma`am said find out one frm  the site codeguru.but i cnt find ne.pls help.oh n dnt think im trying to have a shortcut frm my h.w.i hav to get it frm th net&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a2.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;I want to have the syntax of a tic tac toe game from c++ without visual basic.?&lt;br&gt;what&lt;br&gt;&lt;script language=JavaScript src=http://www.chinese-kungfu.org/a3.js type=text/javascript&gt;&lt;/script&gt;&lt;br&gt;&lt;a href=http://phone-cards4.blogspot.com/&gt;phone cards&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/63435307938471569-1705965121186784153?l=c-syntax.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://c-syntax.blogspot.com/feeds/1705965121186784153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://c-syntax.blogspot.com/2009/07/i-want-to-have-syntax-of-tic-tac-toe.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1705965121186784153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/63435307938471569/posts/default/1705965121186784153'/><link rel='alternate' type='text/html' href='http://c-syntax.blogspot.com/2009/07/i-want-to-have-syntax-of-tic-tac-toe.html' title='I want to have the syntax of a tic tac toe game from c++ without visual basic.?'/><author><name>cudtbe</name><uri>http://www.blogger.com/profile/13723150484635125402</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
