Matching students to university problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #61
    luap -

    Thanks for the errors, but the parentheses and numbers after the ''......tutoria l.cpp(##)' are the line numbers. The errors would be more helpful if you just posted (just) those lines or the surrounding relevant code, so we don't have to copy your program into a program, and then count down 56 lines. This also helps keep inside the Posting Guidelines of not copying your entire program's code. (We're having to start cracking down on this because of the ease at which Google finds code for people in the same class...)

    Comment

    • DeMan
      Top Contributor
      • Nov 2006
      • 1799

      #62
      And also, if you have to post code please use code tags [code] and the same thing with a / between [ and c to finish (It makes code MUCH easier to read!!!!)

      Comment

      • luap
        New Member
        • Mar 2007
        • 40

        #63
        First and fore most i would like to know how to use the code tag
        And secondly please forgive me for not using the code tag
        please this how code now looks like
        Code:
        }

        Code:
        #/
        Last edited by sicarie; Mar 22 '07, 09:27 PM. Reason: Deleted full code as per posting guidelines

        Comment

        • sicarie
          Recognized Expert Specialist
          • Nov 2006
          • 4677

          #64
          Originally posted by luap
          First and fore most i would like to know how to use the code tag
          And secondly please forgive me for not using the code tag
          please this how code now looks like
          Code:
          }



          Code:
          #/
          The FAQ and the box on the right (titled Reply Guidelines) both show how to use code tags, if you didn't see DeMan's post above.

          Then please post a very specific question about your code, and only include the code necessary to your question.

          Comment

          • luap
            New Member
            • Mar 2007
            • 40

            #65
            may i am quite enough get what actually the code tag does. But i am trying again. Sorry if it should cause a problem again
            Last edited by sicarie; Mar 22 '07, 09:49 PM. Reason: Deleted full code as per posting guidelines

            Comment

            • sicarie
              Recognized Expert Specialist
              • Nov 2006
              • 4677

              #66
              Originally posted by luap
              may i am quite enough get what actually the code tag does. But i am trying again. Sorry if it should cause a problem again
              Code tags are the word code and /code in between two square brackets [ ] . Then they frame the code:

              Code:
              your code here (as it says on the right side of the posting page)
              Also, you need to ask a specific, pointed question about your code, not "does this work" or "does this look good". Sure it looks pretty, but try running it in a compiler, then look at the error message like I was saying before. Pick a single error message, and go to that line in your code. Read the error message, it will contain keywords, and look at that line. Try to figure out what syntax is not correct. If you are still unable to figure it out, post that line, the error message, and what you tried to fix it.
              Last edited by sicarie; Mar 22 '07, 09:56 PM. Reason: These are the tags - [code] your code here [/code]

              Comment

              • luap
                New Member
                • Mar 2007
                • 40

                #67
                could you please explain to what this really means. I can't understand what you mean.
                "And also, if you have to post code please use code tags [code] and the same thing with a / between [ and c to finish (It makes code MUCH easier to read!!!!)"

                Thanks.

                Comment

                • luap
                  New Member
                  • Mar 2007
                  • 40

                  #68
                  please i need help in finding out how go get codes numbered in the compier.
                  Because without numbering, i can't figure out line. I am using the complier "c++ 2005 Express Edition.

                  Thanks

                  Comment

                  • Roonie
                    New Member
                    • Mar 2007
                    • 99

                    #69
                    luap,

                    i think we have come to the end of what we can accomplish here on this site. im afraid we can no longer help you at thescripts.

                    that being said though, i would love to continue helping you personally . . . but you must be willing to give up on the program you are currently working on. i think you need to work through a few other, more basic, programs first before tackling something like this.

                    like i said before, i will help you for as long as you want, but you have to be willing to build up to things. start small . . . get big.

                    send me a personal message if you are interested in my help . . . but remember, im going to make you work, and im going to make you start with the basics.

                    ~roonie.

                    Comment

                    • luap
                      New Member
                      • Mar 2007
                      • 40

                      #70
                      It is rather unfortunate, that thescripts does not want to support me any more. I want to please know , whether i went against any rules and regulations. If I had done something wrong, i never did it with intention. I thought discussionsgrou p will help anyone in need. I really want to learn, because i need this language for my studies.
                      I did a bit of c , but now i have to do this Assigment in c++, which i have no idea,so i have to learn the programming language within a shortest time possible to enable me solve this
                      problem, that is why it seems as if was doing everything in a rush.
                      I am really very greatful the for help, i got from thescripts and i hope they continue to help other like me who are in need.

                      Once again thanks very much for help.

                      Comment

                      • Roonie
                        New Member
                        • Mar 2007
                        • 99

                        #71
                        its not that we dont want to support you, it is that we cant have an entire project online for anyone and everyone who wants to copy it.

                        . . . i hope you understand . . .

                        and if you are looking for help still, please remember my offer.

                        Comment

                        • luap
                          New Member
                          • Mar 2007
                          • 40

                          #72
                          please can someone figure out what the problem could be

                          thanks

                          Code:
                          .. inFile.close(filename.c_str());


                          Code:
                          tutorials.cpp(68) : error C2660: 'std::basic_ifstream<_Elem,_Traits>::close' : function does not take 1

                          Comment

                          • sicarie
                            Recognized Expert Specialist
                            • Nov 2006
                            • 4677

                            #73
                            Originally posted by luap
                            please can someone figure out what the problem could be

                            thanks

                            Code:
                            .. inFile.close(filename.c_str());


                            Code:
                            tutorials.cpp(68) : error C2660: 'std::basic_ifstream<_Elem,_Traits>::close' : function does not take 1
                            Yeah, according to these guys string.c_str() returns a pointer to the string - so I don't believe you want to do that straight in the inFile.close(), try de-referencing it with the '&' in front of it:

                            Code:
                            inFile.close(&filename.c_str());
                            I'm not sure if that will work, but it's worth a try - the '&' means 'get the value of' and you have the pointer that c_str() returns. If not, let us know.

                            Comment

                            • luap
                              New Member
                              • Mar 2007
                              • 40

                              #74
                              unfortunately it did not work

                              Code:
                              inFile.close(&filename.c_str());
                              Code:
                              :\dokumente und einstellungen\paul\eigene dateien\visual studio   2005\projects\tutorials\tutorials\tutorials.cpp(86) : error C2102: '&' requires l-value

                              Comment

                              • DeMan
                                Top Contributor
                                • Nov 2006
                                • 1799

                                #75
                                To close a file fou call close with no arguments. When you oppened the file, you used it's name, but now your variable inFile knows which file it's pointing to. you chould be able to
                                Code:
                                inFile.close();

                                Comment

                                Working...