Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Problems in C++

  1. Oct 6, 2007 #1

    malawi_glenn

    User Avatar
    Science Advisor
    Homework Helper

    I have this in my .cc file:

    #ifndef __FASTJET_FASTJET_BASE_HH__
    #define __FASTJET_FASTJET_BASE_HH__

    // define this for easier readability (and obfuscation?) in
    // a range of places
    #define FASTJET_BEGIN_NAMESPACE namespace fastjet{
    #define FASTJET_END_NAMESPACE}

    #endif // __FASTJET_FASTJET_BASE_HH__

    When Iam trying to run the file, the prompt says:

    Error: Missing one of '
    \/' expected at or after line 37.

    And I have NO idea what Iam suppose to fix =/
     
  2. jcsd
  3. Oct 6, 2007 #2

    Hurkyl

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Did you mean in your *.hh file? And what do you mean by "run the file"?

    It's kind of hard to guess what the problem is when you don't even quote line 37; a few lines before that might even be necessary!
     
  4. Oct 6, 2007 #3

    malawi_glenn

    User Avatar
    Science Advisor
    Homework Helper

    I wrote filename in root, to run the file.

    The line 37 is:
    #define FASTJET_BEGIN_NAMESPACE namespace fastjet{
     
  5. Oct 6, 2007 #4

    Hurkyl

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    You can't run C++ source code... you have to compile & link them into an executable, and then run the executable...
     
  6. Oct 6, 2007 #5

    malawi_glenn

    User Avatar
    Science Advisor
    Homework Helper


    Iknow, I just wanted to ask what error I have made in the code.
     
  7. Oct 13, 2007 #6
    Post at least 5 lines before line 37 too.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Problems in C++
  1. C problem (Replies: 3)

  2. C++ problem (Replies: 4)

  3. A C problem (Replies: 3)

  4. C++ problem (Replies: 11)

  5. A problem with C (Replies: 4)

Loading...