Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_pre.php on line 387

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_pre.php on line 387

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_seo.php on line 337

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_seo.php on line 339

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_seo.php on line 341

Warning: Non-static method vBSEO_Storage::path() should not be called statically in ..../vbseo/includes/functions_vbseo_seo.php on line 343
Char - test Help

Results 1 to 9 of 9
  1. #1
    Semi-Coder
    Join Date
    Jun 2007
    Posts
    1,012

    Char - test Help

    How would i make this value be test???

    char testing[256]; //NEEDS TO EQUAL test

    what can i do?
    im just guessing
    char testing[256][test];
    char testing[256]["test"];
    char testing[256, test];


    Problem Fixed thanks to kirby
    if anyone wants to know how to do it
    char tesing[256] = "test";



    MY 100TH POST WOOT

  2. #2
    Veteran Member
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    748

    Re: Char - test Help

    Quote Originally Posted by Thor|cU|Ipwn View Post
    char tesing[256] = "test";
    There is no point in having a buffer that large lol, just allocate enough space for the characters and the null terminator.
    Code:
    <chaplja|> i'm taking over nixcoders
    <Smileman`> cool

  3. #3
    VIP null's Avatar
    Join Date
    Apr 2006
    Posts
    1,796

    Re: Char - test Help

    Quote Originally Posted by Couch View Post
    There is no point in having a buffer that large lol, just allocate enough space for the characters and the null terminator.
    Yes there is, he does not necessarily have to be storing the value test and may use it later :P


  4. #4
    Veteran Member
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    748

    Re: Char - test Help

    Quote Originally Posted by null View Post
    Yes there is, he does not necessarily have to be storing the value test and may use it later :P
    Well it just appeared to me he was using it to hold "test". :P
    Code:
    <chaplja|> i'm taking over nixcoders
    <Smileman`> cool

  5. #5
    Semi-Coder
    Join Date
    Jun 2007
    Posts
    1,012

    Re: Char - test Help

    yah im using that to store test, to match it up with an other value and if the values are the same, it does the function but it isnt working why?

  6. #6
    VIP null's Avatar
    Join Date
    Apr 2006
    Posts
    1,796

    Re: Char - test Help

    Quote Originally Posted by Thor|cU|Ipwn View Post
    yah im using that to store test, to match it up with an other value and if the values are the same, it does the function but it isnt working why?
    Talked to you on IRC about this already, but will say for public in case someone is curious.

    You can compare strings using strcmp(string1, string2)==0 . If this is true, they are the same.


  7. #7
    Semi-Coder
    Join Date
    Jun 2007
    Posts
    1,012

    Re: Char - test Help

    thank you null, ill try to hit you up on irc later if your on

  8. #8
    Senior Member
    Join Date
    May 2006
    Posts
    225

    Re: Char - test Help

    you could also use strstr(string 1, string2) if the strings your comparing don't have to be identical, so instead you look for the first occurence of "test" in the string, the same principle applies, if true then it was found etc etc

    dunno if this might come in useful.

  9. #9
    Semi-Coder
    Join Date
    Jun 2007
    Posts
    1,012

    Re: Char - test Help

    ahh thanks.

Similar Threads

  1. Test
    By xHalt in forum Gallery
    Replies: 5
    Last Post: June 13th, 2008, 22:33
  2. Acc for test
    By Account Deleted in forum Gallery
    Replies: 14
    Last Post: September 1st, 2007, 18:05

Bookmarks

Posting Permissions

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