Results 1 to 5 of 5

Thread: Pointer arrays

Threaded View

  1. #1

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037

    Pointer arrays

    Why can't I input into the pointer array?

    #include <iostream>
    #include <cstdlib>
    #include <cctype>

    int main(){
    char *g[5];

    for (int i=0; i<5; i++)
    cin>> g[i];

    for (int i=0; i<5; i++)
    cout<< g[i]<< endl;

    system("PAUSE");
    return 0;
    }
    Last edited by aewarnick; Jan 17th, 2003 at 06:38 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width