Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2007
    Posts
    6

    Branching/Splitting problems?

    Can someone help me? When following the tutorial i try to copy there example by making it my wn. But when ever i do it iw doesnt split off ito seprete parts, heres an ex/



    I've tried tons of things, never found out how yet. Can someone tell me how!


    THanks in advance.

  2. #2
    Join Date
    Nov 2006
    Posts
    87
    Im somewhat confused on what you are asking but glancing at your code you need the block that holds the code for your main function to be in curly brackets not parenthesis. and also main needs to be a function of type int and have a return value. something like this:

    Code:
    int main()
    {
    //code goes here
    
    return 0;
    }
    i dont really know what tutorials you are talking about, but hopefully that will at least get you on the right track
    "Luck aint even lucky, got to make your own breaks..."

  3. #3
    Join Date
    Nov 2006
    Location
    UK
    Posts
    3,774
    When you say separate parts, do you mean the different functions? I thought you were talking of threading before I saw the picture.
    Delphi !ROCKS!
    Got a question? Read this first!!!
    "You gotta help us, Doc. We've tried nothin' and we're all out of ideas"

  4. #4
    Join Date
    Sep 2007
    Posts
    6
    Sorry for not being so clear, See on the picture just before the pound symbol theres a - with a line going down. That line is soposed to separate at the end of include and make a new one at main.

    Im sorry this is hard to say.

  5. #5
    Join Date
    Feb 2005
    Location
    Bellevue, WA
    Posts
    3,251
    You need to use curly braces "{}" and not parenthesis "()" for your main function.

    Code:
    int main()
    {
    }
    NOT

    Code:
    int main()
    (
    )

    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." ~Rich Cook

  6. #6
    Join Date
    Nov 2006
    Location
    UK
    Posts
    3,774
    Ah, by branching I guess you mean the line on the border that can get the little + boxes which allow code collapsing.. yes, as has been said you need to use the curly brackets (eg shift+[ and shift+] not the ones above 9 and 0)
    Delphi !ROCKS!
    Got a question? Read this first!!!
    "You gotta help us, Doc. We've tried nothin' and we're all out of ideas"

Posting Permissions

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