473,394 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

build fail

i'm just learning programming from a book but i don't know why it always fails to build.
Expand|Select|Wrap|Line Numbers
  1. #include <stdio.h>
  2. #include <ctype.h>
  3. #include <conio.h>
  4. int main()
  5.  {
  6.  
  7.  char letter;                                                    // Letter typed by the user
  8.  
  9.    printf("Do you want to continue?\ (Y/N): ");
  10.  
  11.    letter = getch();                                          // Get the letter
  12.    letter = toupper(letter);                               // Convert letter to uppercase
  13.  
  14.    while ((letter != 'Y') && (letter != 'N'))
  15.      {
  16.        putch(7);                                          // Beep the speaker
  17.        letter = getch();                                  // Get the letter
  18.        letter = toupper(letter);                           // Convert letter to uppercase
  19.      }
  20.  
  21.    printf("\n Your response was %c \n", letter);
  22.   }
  23.  
Aug 4 '15 #1
1 1967
weaknessforcats
9,208 Expert Mod 8TB
This code:

Expand|Select|Wrap|Line Numbers
  1. printf("Do you want to continue?\ (Y/N): ");
  2.  
should look like:
Expand|Select|Wrap|Line Numbers
  1. printf("Do you want to continue? (Y/N): ");
  2.  
That \ in the original version is the escape sequence. It tells the compiler that the character following the \ is a escape sequence character. Like \n where the n means "newline".

There is no \(, hence the error.
Aug 4 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Jussi Mononen | last post by:
Hi, I'm having problems to successfully execute the test scripts on a Compaq host ( OSF1 tr51bdev V5.1 2650 alpha ). Almost all tests end up with the following error message "PARI: *** ...
3
by: David Battams | last post by:
Hi there, I'm calling xcopy in a post build event to copy some runtime requirements to the TargetDir of the application I am working on. Problem is that I only seem to be able to have 9 calls to...
1
by: David Alloza | last post by:
Hello, I have exactly the same problem as this guy, but in the case of a ( final ) commercial version of .NET2005. ...
10
by: Larry Hastings | last post by:
I'm an indie shareware Windows game developer. In indie shareware game development, download size is terribly important; conventional wisdom holds that--even today--your download should be 5MB or...
1
by: | last post by:
I'm having a problem finding the cause for this problem. I have a solution in Visual Studio 2005 that contains two projects -- a Web Site and a Class Library. The web site references the class...
6
by: nickdu | last post by:
I usually try to stay away from _alloca(). However, I'm considering using it for a logging function. Our current logging function maintains its own buffer which it grows to fit the string being...
8
by: Alexander Llew Wykel | last post by:
I have a project where I load some of my assemblies dynamically, I'm using a venders product where he loads some assemblies dynamically. He loads two assemblies that both share a common name;...
4
by: Ronny | last post by:
I have a mixed solution -most of its projects are in C# and some are in C++?MFC. Problem is that when I compile the solution with batch build the MFC files end up wit compilation errors, but if I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.