This program works, but it seams like when I give more the 3 char's in to
array 2, I get this: "Segmentation fault (core dumped)"
Here's the source:
[start]
// chararray.cpp
#include
void main()
{
char array[2][10];
cout << "Enter array 1: ";
cin >> array[1];
cout << "Enter array 2: ";
cin >> array[2];
cout << "Array 1: " << array[1] << endl;
cout << "Array 2: " << array[2] << endl;
}
[eof]
and here's the error:
[start]
sco-systems:~/work/code$ chararray
Enter array 1: test1
Enter array 2: test2
Array 1: test1
Array 2: test2
Segmentation fault (core dumped)
sco-systems:~/work/code$
[eof]
Thanks for all help...
__ __ __ __ _ _
/_ // / // ///\// email: scooby@applausenett.no
_ _ __ __//_ /_//_//_/// homepage: http://www.applausenett.no/~scooby/
--- BBBS/L v3.33 How
---------------
* Origin: Fluxpod Information eXchange, telnet://fix.no (2:210/30)
|