Express
New Member
stay stong and never give in
Posts: 3
|
Post by Express on Aug 17, 2003 17:06:10 GMT -5
I have been working on a simple calender program in C++ and I have come upon a problem with the getline operator. My problem is I want to be able to save a string to a specific point in an array of strings. So I use "getline(cin, tempbuff)" which should take whatever input from "cin >>" and store it in the string tempbuff. However, it's not storing anything in tempbuff after the cin>>. For better review, here is my source code -> www.geocities.com/neo_centre/source.htmlIf you would take a look at/or compile and run it you'd probably understand what I'm talking about. My problem occurs right before the end of main(). Any reply is appreciated. Oh and btw, you may notice that the libraries I'm using are referenced with '(' rather than '<'. This is because I had to change it cuz HTML wasn't understanding the greater than brackets. It thought they were HTML tags.
|
|
|
Post by Leonardo on Aug 18, 2003 12:25:05 GMT -5
My guess is that char [tempbuff]="Hi", has a size of 2 therefore, any string larger that this sie wont be stored....
Have u tried using one letter.... or even more.... increasing this size??
Leonardo
|
|