Error C2015 Too Many Characters In Constant String
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss too many characters in character constant in c the workings and policies of this site About Us Learn more
C2015 Moe
about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack
C2105
Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping
C++ String
each other. Join them; it only takes a minute: Sign up c++ error c2015: too many characters in constant up vote -2 down vote favorite Sorry if it's something simple, but I'm new to C++ and haven't really gotten a good hold on it, yet. I need to build a calculator whose only named variables are pointers, and this is what I have so far, but I keep getting errors and I can't figure out why. Every error that always related to my if construct, though. int main() { //Creating variables //Values to perform operations on float *aptr = new(nothrow)float; float *bptr = new(nothrow)float; float *ansptr = new(nothrow)float; int *endptr = new(nothrow)int; char *operationptr = new(nothrow)char; cout << "Simple Operation Calculator" << endl; //Displays program name cout << "Performs +, -, *, or / on any two real operands." << endl; //Describes nature of program to user *endptr = 1; while(*endptr = 1) //Creates a loop so that the user may perform as many operations as desired { //Prompts the user for the first operand cout << "First operand: " << endl; cin >> *aptr; //Prompts user for operator cout << "Operator(+,-,*,/): " << endl; cin >> *operationptr; //Prompts user for second operand cout << "Second operand: " << endl; cin >> *bptr; //Performs requested operation if(*operationptr == '+' || *operationptr == 'plus') { *ansptr = *aptr +
Forum Visual C++ & C++ Programming Visual C++ Programming [RESOLVED] C++ error C2015 "Too many characters in constant" If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register or Login before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 6 of 6 Thread: [RESOLVED] C++ error C2015 "Too many characters in constant" Tweet Thread Tools Show Printable Version Email this http://stackoverflow.com/questions/25791306/c-error-c2015-too-many-characters-in-constant Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode July 28th, 2013,06:35 PM #1 gamesun View Profile View Forum Posts Junior Member Join Date Mar 2013 Posts 4 [RESOLVED] C++ error C2015 "Too many characters in constant" I'm trying to put an if-else statement in a do-while loop and when I put the correct answer in the if statement I http://forums.codeguru.com/showthread.php?538769-RESOLVED-C-error-C2015-quot-Too-many-characters-in-constant-quot get that error. I'm creating a program to help someone who speaks Spanish lean English. Here's the program: #include
Programming Boards C Programming A beginner level problem with char datatype Getting started with C or C++ | C Tutorial | C++ Tutorial | C and C++ http://cboard.cprogramming.com/c-programming/125117-beginner-level-problem-char-datatype.html FAQ | Get a compiler | Fixes for common problems Thread: A beginner level problem with char datatype Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 03-25-2010 #1 stiltz View Profile View Forum Posts Registered User Join Date Mar 2010 Posts 9 A beginner level problem with char datatype Hi all, I too many am a new user of c language and I have written a program which just first stores the char values in memory then it reads and prints. Following is the code: Code: #include