Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- char BUFF[500];
- // Gets the ACTUAL length of an individual character array.
- int getLength(char* chrarray) {
- int counter = 0;
- while (chrarray[counter] != '\0') {
- counter++;
- }
- counter += 1;
- return counter;
- }
- void getArray() {
- int state = 1;
- char LINE[30];
- char* arrow = BUFF;
- do {
- arrow += getLength(LINE);
- cin.getline(BUFF, 30);
- //LINE = arrow;
- } while (LINE[0] != '0');
- }
- void pause() {
- cin.clear(); cin.ignore(80, '\n');
- do {
- cout << "PRESS ENTER TO CONTINE" << endl;
- } while (cin.get() != '\n');
- }
- int main() {
- getArray();
- //system("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment