string concatenation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mkiveni
    New Member
    • Jul 2008
    • 4

    string concatenation

    Hi,

    I am using the command Form to create a string following a specific format, but g++ complier returns a error message saying that Form is not declared in the scope. Here is what I did:

    fn1 = Form("%.6d_%.4d _F%.4d.gz",part 1,part2,evnt1);

    part1, etc has been defined in the previous part of the code. So what should I do?

    Joseph
  • Brosert
    New Member
    • Jul 2008
    • 57

    #2
    is "Form" a function that you have created yourself, or does it come from an external library.

    Comment

    • gpraghuram
      Recognized Expert Top Contributor
      • Mar 2007
      • 1275

      #3
      Is Form a variable argumnt function.....?

      Raghu

      Comment

      • mkiveni
        New Member
        • Jul 2008
        • 4

        #4
        Hi,

        I am not sure about what exactly is "Form", a function that somebody has created or function that come together with the standard library. But one thing that I am sure is the fact that Form works quitte well just with the declaration of the standard input output in one of my separate code. But when I am putting different pieces of my codes together, the problem of declaring Form shows up. I don't get it. Any ideas?

        Jos

        Comment

        • mkiveni
          New Member
          • Jul 2008
          • 4

          #5
          Originally posted by mkiveni
          Hi,

          I am using the command Form to create a string following a specific format, but g++ complier returns a error message saying that Form is not declared in the scope. Here is what I did:

          fn1 = Form("%.6d_%.4d _F%.4d.gz",part 1,part2,evnt1);

          part1, etc has been defined in the previous part of the code. So what should I do?

          Joseph
          Hi,

          I am not sure about what exactly is "Form", a function that somebody has created or function that come together with the standard library. But one thing that I am sure is the fact that Form works quitte well just with the declaration of the standard input output in one of my separate code. But when I am putting different pieces of my codes together, the problem of declaring Form shows up. I don't get it. Any ideas?

          Jos

          Comment

          • Banfa
            Recognized Expert Expert
            • Feb 2006
            • 9067

            #6
            Assuming that Form is a function somewhere then it needs to be declared before it is used. The declaration is (presumably) in a header file somewhere so if you are getting a "Form undeclared" error you have then not included the correct header in your code.

            Comment

            • gpraghuram
              Recognized Expert Top Contributor
              • Mar 2007
              • 1275

              #7
              Look for the declaration of Forms in header files and post it here....
              Then we will be able to comment on it.


              Raghu

              Comment

              Working...