How to pass char** in python ctype?

Runtime error when trying to pass varible to function it aborts plz help?

  • Runtime error when trying to pass varible to function it aborts plz help? this code appears to work for other people, but not me, I've tried everything and the people who can help me DON'T apparently when my program tries to pass the number variable to the "pass" function, by program aborts, if someone out there could be so kind to help me fix this problem I would greatly apprecaite it. Thnx. #include <iostream> #include <climits> #include <cstring> const char ssz = 77; const char osz = 21; void pass(short num); void pass(char* str); int main(void) { using std::cout; using std::cin; using std::endl; short number; restart: char* string = new char[ssz]; char option[osz]; cout << "Enter in \"number\" or \"string\" wether you want a string" << " to be passed to the\nfunciton or a number\n"; cin.getline(option, osz); if(strcmp(option, "number") == 0 || strcmp(option, "Number") == 0) { cout << "Enter in any number between " << SHRT_MIN << " and " << SHRT_MAX << endl; cin >> number; pass(number); delete [] string; } else if(strcmp(option, "string") == 0 || strcmp(option, "String") == 0) { cout << "Enter in any text no more than " << ssz-1 << " characters long\n"; cin.getline(string, ssz); pass(string); delete [] string; } else { cout << "You need to type in either \"number\" or \"string\" try again,\nPress Enter to continue.\n"; cin.get(); goto restart; delete [] string; } cin.get(); } void pass(short num) { using std::cout; using std::endl; cout << "The number you entered was " << num << " and " << num << " multiplied by 2 = " << num*2 << endl; } void pass(char* str) { using std::cout; cout << "the text you entered was " << str << ",\n" << "which contains exactly " << strlen(str) << " characters" << " in it.\n"; }

  • Answer:

    Hi,Sean There are 3 step to repair runtime error If you got runtime error then there is a 94% chance that your computer has registry problems. To repair runtime error you need to follow the steps below: * Step 1 - Download a runtime error repair tool,install this error repair tool. * Step 2 - Click the Repair All Button.It will scan you pc for Free. * Step 3 - Then click the Repair All Button again and your done! It is very easy to repair runtime error. Here are the url of runtime error repair tool:http://www.fixerrorfast.com/ttfix-runtime_error-zz0001

Sean at Yahoo! Answers Visit the source

Was this solution helpful to you?

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.