gay error annoying me

This is a discussion on gay error annoying me within the C++ Programming forums, part of the General Programming Boards category; the error invalid types `char[int]' for array subscript the line wiht the erorr Code: menuscreenv[1250]="&&&&&&&&&&&-MENU-&&&&&&&&&&&&&& *\n& & **\n& 1. Resume ...

  1. #1
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608

    gay error annoying me

    the error
    invalid types `char[int]' for array subscript
    the line wiht the erorr

    Code:
    menuscreenv[1250]="&&&&&&&&&&&-MENU-&&&&&&&&&&&&&&                   *\n&                             &                    **\n&  1. Resume Game             &                     ****\n&                             &       ****          *******\n&                             &      *    *       *********\n&  2. Save Game               &      *    *     *************\n&                             &       ****     *****************\n&                             &        **        ##############\n&  3. View Status             &        **       ####   ##   ####\n&                             &        **      #####   ##   #####\n&                             &        **      #####   ##   #####\n&  4. View Map                &        **       ################\n&                             &        **        ##############\n&                             &        **         ############\n&  5. Go to Main Screen       &        **      %%%%%%%%%%%%%%%%%%%\n&                             &        **     %%%%%%%%%%%%%%%%%%%%%\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&        **   %%%%%%%%%%%%%%%%%%%%%%%%";
    before int main i named the varibale like this


    char menuscreenv;
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  2. #2
    Registered User
    Join Date
    Jul 2002
    Posts
    94
    You declared it as a single character before. Try this:

    Code:
    char * menuscreenv;
    Brendan

  3. #3
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    new error

    assignment to `char' from `const char *' lacks a cast

    same line
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  4. #4
    Funniest man in this seat minesweeper's Avatar
    Join Date
    Mar 2002
    Posts
    801
    Code:
    menuscreenv[1250]="&&&&&&&&&&&-MENU-&&&&&&&&&&&&&&                   *\n&
    Surely you want it to be:

    Code:
    menuscreenv[]="&&&&&&&&&&&-MENU-&&&&&&&&&&&&&&                   *\n& "
    or something similar. By putting the subscript in you are trying to load all that text into one character position.

  5. #5
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    here is the surrouding code,

    Code:
    if (charactertype ==1)
    menuscreenv[]="&&&&&&&&&&&-MENU-&&&&&&&&&&&&&&                   *\n&                             &                    **\n&  1. Resume Game             &                     ****\n&                             &       ****          *******\n&                             &      *    *       *********\n&  2. Save Game               &      *    *     *************\n&                             &       ****     *****************\n&                             &        **        ##############\n&  3. View Status             &        **       ####   ##   ####\n&                             &        **      #####   ##   #####\n&                             &        **      #####   ##   #####\n&  4. View Map                &        **       ################\n&                             &        **        ##############\n&                             &        **         ############\n&  5. Go to Main Screen       &        **      %%%%%%%%%%%%%%%%%%%\n&                             &        **     %%%%%%%%%%%%%%%%%%%%%\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&        **   %%%%%%%%%%%%%%%%%%%%%%%%";
    else if (charactertype == 2)
    menuscreenv[]="&&&&&&&&&&&-MENU-&&&&&&&&&&&&&&  <<<<<<<>>>>>>>>&&&&&&\n&                             & <<<<<<<<>>>>>>>>>&&&&&&\n&  1. Resume Game             & <<<<<<<<>>>>>>>>>&&  &&&\n&                             &  <<<<<<<>>>>>>>>&&&  &&&\n&                             &        |||   &&&&&&&&&&&\n&  2. Save Game               &        |||   &&&&&&&&&&&\n&                             &      %%|||%%  &&&&&&&&&   %%%%%\n&                             &      eeeeeee%%%%%%%%%%%%%%%%%%%%%\n&  3. View Status             &      eeeeeee%%%%%%%%%%%%%%%%%%%%%\n&                             &      eeeeeee%%%%%%%%%%%%%%%%%%%%e\n&                             &        |||%%%%%%%%%%%%%%%%%%%%eee\n&  4. View Map                &        |||%%%%%%%%%%%%%%%%%%%eeeee\n&                             &        |||%%%%%%%%%%%%%%%%%%eeeeeee\n&                             &        |||%%%%%%%%%%%%%%%%%%eeeeeee\n&  5. Go to Main Screen       &        |||%%%%%%%%%%%%%%%%%%%eeeeee\n&                             &        |||%%%%%%%%%%%%%%%%%%% eeee\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&        |||%%%%%%%%%%%%%%%%%%  eeee";
    else if (charactertype == 3)
    menuscreenv[]="&&&&&&&&&&&-MENU-&&&&&&&&&&&&&&                !\n&                             &            &&&&!!&&&&\n&  1. Resume Game             &           &&&&&!!&&&&&\n&                             &          &&&&&&!!!&&&&&\n&                             &         &&&&& &!!! &&&&&\n&  2. Save Game               &         &&&&   !!!  &&&&\n&                             &         &&&&& &!!! &&&&&\n&                             &         &&&&&&&!!!&&&&&&\n&  3. View Status             &          &&&&&&!!!&&&&&\n&                             &           &&&&&!!!&&&&\n&                             &        %%%%%%%%!!!%%%%%%%\n&  4. View Map                &       %%%%%%%%%!!!%%%%%%%%\n&                             &     %%%%%%%%%%%!!!%%%%%%%%%\n&                             &    %%%%%^%%%%%%!!!%%%%%^%%%%\n&  5. Go to Main Screen       &   %%%%%%^%%%%%%!!!%%%%%^%%%%%\n&                             &  %%%%%%%^%%%%%%!!!%%%%%^%%%%%%\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&    %%%%%%^%%%%!!!!!%%%^%%%%%%";
    else if (charactertype == 4)
    menuscreenv[]="&&&&&&&&&&&-MENU-&&&&&&&&&&&&&&                   &&&&&&&&\n&                             &                  &&&&&&&&&&\n&                             &                  &&   &   &\n&  1. Resume Game             &                  &&  &&&  &\n&                             &                  &&&&&&&&&&\n&                             &                  &&&&&&&&&&\n&  2. Save Game               &                   &&&&&&&&\n&                             &              %%%%%%%%%%%%%%%%%%\n&                             &             ^^^%%%%%%%%%%%%%%^^^\n&  3. View Status             &            %%^^^^%%%%,-%^^^^%^^^^\n&                             &            %%%^^^^%%/%%/^^^^^%^^^^\n&                             &            %%%%^^^^/%%///%^^^^%^^^^\n&  4. View Map                &            %%%%%^^^^%///%%%%^^^^^^^^\n&                             &            %%%%%^^^^^^/%%%%%%^^^^^^^\n&                             &            %%%%%/^^^^^^%%%%%%%^^^^^\n&  5. Go to Main Screen       &            %%%%/%%///%%%%%%%%%%%\n&                             &            %%%/%%///%%%%%%%%%%%%\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&              /%%///%%%%%%%%%%%%";
    but i got this error
    parse error before `]'
    I know if it says stuff like parse error before something it means im missing a semicolin or something like that, but it said before ] witch i was guessing it doesnt want to count the characters.

    the new error i just posted is for the same previous lines.
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  6. #6
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    shall this error remain eternaly gay?
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  7. #7
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    the code now read
    if (charactertype ==1)
    menuscreenv = "&&&&&&&&&&&-MENU-&&&&&&&&&&&&&& *\n& & **\n& 1. Resume Game & ****\n& & **** *******\n& & * * *********\n& 2. Save Game & * * *************\n& & **** *****************\n& & ** ##############\n& 3. View Status & ** #### ## ####\n& & ** ##### ## #####\n& & ** ##### ## #####\n& 4. View Map & ** ################\n& & ** ##############\n& & ** ############\n& 5. Go to Main Screen & ** %%%%%%%%%%%%%%%%%%%\n& & ** %%%%%%%%%%%%%%%%%%%%%\n&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&& ** %%%%%%%%%%%%%%%%%%%%%%%%\n";
    else if (charactertype == 2)
    menuscreenv = "&&&&&&&&&&&-MENU-&&&&&&&&&&&&&& <<<<<<<>>>>>>>>&&&&&&\n& & <<<<<<<<>>>>>>>>>&&&&&&\n& 1. Resume Game & <<<<<<<<>>>>>>>>>&& &&&\n& & <<<<<<<>>>>>>>>&&& &&&\n& & ||| &&&&&&&&&&&\n& 2. Save Game & ||| &&&&&&&&&&&\n& & %%|||%% &&&&&&&&& %%%%%\n& & eeeeeee%%%%%%%%%%%%%%%%%%%%%\n& 3. View Status & eeeeeee%%%%%%%%%%%%%%%%%%%%%\n& & eeeeeee%%%%%%%%%%%%%%%%%%%%e\n& & |||%%%%%%%%%%%%%%%%%%%%eee\n& 4. View Map & |||%%%%%%%%%%%%%%%%%%%eeeee\n& & |||%%%%%%%%%%%%%%%%%%eeeeeee\n& & |||%%%%%%%%%%%%%%%%%%eeeeeee\n& 5. Go to Main Screen & |||%%%%%%%%%%%%%%%%%%%eeeeee\n& & |||%%%%%%%%%%%%%%%%%%% eeee\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& |||%%%%%%%%%%%%%%%%%% eeee";
    else if (charactertype == 3)
    menuscreenv = "&&&&&&&&&&&-MENU-&&&&&&&&&&&&&& !\n& & &&&&!!&&&&\n& 1. Resume Game & &&&&&!!&&&&&\n& & &&&&&&!!!&&&&&\n& & &&&&& &!!! &&&&&\n& 2. Save Game & &&&& !!! &&&&\n& & &&&&& &!!! &&&&&\n& & &&&&&&&!!!&&&&&&\n& 3. View Status & &&&&&&!!!&&&&&\n& & &&&&&!!!&&&&\n& & %%%%%%%%!!!%%%%%%%\n& 4. View Map & %%%%%%%%%!!!%%%%%%%%\n& & %%%%%%%%%%%!!!%%%%%%%%%\n& & %%%%%^%%%%%%!!!%%%%%^%%%%\n& 5. Go to Main Screen & %%%%%%^%%%%%%!!!%%%%%^%%%%%\n& & %%%%%%%^%%%%%%!!!%%%%%^%%%%%%\n&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&& %%%%%%^%%%%!!!!!%%%^%%%%%%";
    else if (charactertype == 4)
    menuscreenv = "&&&&&&&&&&&-MENU-&&&&&&&&&&&&&& &&&&&&&&\n& & &&&&&&&&&&\n& & && & &\n& 1. Resume Game & && &&& &\n& & &&&&&&&&&&\n& & &&&&&&&&&&\n& 2. Save Game & &&&&&&&&\n& & %%%%%%%%%%%%%%%%%%\n& & ^^^%%%%%%%%%%%%%%^^^\n& 3. View Status & %%^^^^%%%%,-%^^^^%^^^^\n& & %%%^^^^%%/%%/^^^^^%^^^^\n& & %%%%^^^^/%%///%^^^^%^^^^\n& 4. View Map & %%%%%^^^^%///%%%%^^^^^^^^\n& & %%%%%^^^^^^/%%%%%%^^^^^^^\n& & %%%%%/^^^^^^%%%%%%%^^^^^\n& 5. Go to Main Screen & %%%%/%%///%%%%%%%%%%%\n& & %%%/%%///%%%%%%%%%%%%\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& /%%///%%%%%%%%%%%%";
    cout << menuscreenv << endl;
    but it just says (null) im guessing i did not write the the varibale. above int main i put


    char * menuscreenv;
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  8. #8
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    i fixed it, on the first if i had to space out the 1 corrctly
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  9. #9
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    Gay error? I'd be upset too if my computer called me a gaylord. What compiler are you using?

  10. #10
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    dev c++ 4. tat reminds me, when i go downtown i always pass by a company called "GayLord"
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. gay blunt smoking downloaders allowed
    By caroundw5h in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 04-01-2004, 10:19 AM
  2. Do you support gay people
    By Golden Bunny in forum A Brief History of Cprogramming.com
    Replies: 89
    Last Post: 05-11-2002, 04:09 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21