How would you define a string so that it is just the size of the user input??
right now in my calc program i have
but ofcourse as soon as there are empty spaces it starts displaying weird characters which i don't want it to.Code:int main() { char calc[50]; cout<<"Calc: "; cin>>calc; for(int i=0;i<50;i++) { cout<<calc[i]; } getchar(); return 0; }
I just started this but its supposed to become a calculator which accepts inputs such as: 3*3+8
Original Idea coming from: joshdick
-Devouring One-