Why won't this work? the compiler says the function is wrong. It's a program that finds ASCII values. pretty straightforward.
Code:*/ #include <iostream.h> #include <conio.h> int main() { void calc() { int i; int max; cin>>max; for(i=1;i<max;i++) { char value=i; cout<<value<<endl; } } char option; cout<<"Continue? c=yes"<<endl; cin>>option; if(option=='c') { calc(); } getch(); getch(); getch(); return 0; }




Reply With Quote