Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12

Thread: what is wrong ?

  1. #1
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    what is wrong ?

    [IMG][/IMG]

    on line 6 where it says (''Game'') what is wroong with it

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,866
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    It looks like two single quotes instead just one double quote.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [IMG][/IMG]


    this is what happens when i put it in one double quote. I have a hard time learning all this do you know any good tutorials ?

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Those are single quotes, not double quotes. Java requires strings be identified by "STRING" while chars are identified by 'C'.
    Are you saying that your eclipse is replacing " with '?

  • #5
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fou-Lu View Post
    Those are single quotes, not double quotes. Java requires strings be identified by "STRING" while chars are identified by 'C'.
    Are you saying that your eclipse is replacing " with '?
    when i press ' it makes 2 so i can type inside of them

  • #6
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    No, that's not the same as a double quote. Eclipse auto-completes the ' and " by default and places the cursor between them. You need to use " when dealing with a string, not '.

  • #7
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fou-Lu View Post
    No, that's not the same as a double quote. Eclipse auto-completes the ' and " by default and places the cursor between them. You need to use " when dealing with a string, not '.
    im sorry i don't understand, but im pretty sure i used '' in the first picture ? sorry for being a noob :/

  • #8
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    no the first picture is two sets of ', not ".

  • #9
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fou-Lu View Post
    no the first picture is two sets of ', not ".

    extreme noob question,how do i make '' and not 2 sets '

  • #10
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Shift + ' makes ".

  • #11
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,930
    Thanks
    46
    Thanked 203 Times in 202 Posts
    my suggestion until you understand syntax's and proper techniques is to write/code all your code in an outside editor that does not auto complete anything for you- ie no intellie-sense/auto-complete... Notepad++ is great for this and will help you with color coordination and not auto complete... IDE's that "help" you can really hurt you if you do not understand it at a fundamental level
    *Just my two cents

    Edit: Then save the file accordingly and load it into your IDE and compile/validate

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #12
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    My suggestion is to take a keyboarding, or in my day, a typing class to learn the different between a single and double quote! lol
    Teed


  •  

    Posting Permissions

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