problems with list link..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • samimmu
    New Member
    • Mar 2007
    • 32

    problems with list link..

    i have wrote a program which consist of three parts. list.cpp, list.h. and company.cpp

    i tried to figre it out but i couldn't. the problem is i can not input into the file, i gives me white message.. which is logical errors, i couldn't figure it out... anybody there can help...


    please help


    this is assignment.cpp

    Full code removed per posting guidelines
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    Please supply code that will compile and link. I can help you then.

    Comment

    • samimmu
      New Member
      • Mar 2007
      • 32

      #3
      Originally posted by weaknessforcats
      Please supply code that will compile and link. I can help you then.

      actually the code is all there.. the main program and the list.h and the assignment...


      i wish u can copy and paste the whole programs and make them in one project because i am using Dev++...


      thanks

      anybody there can help...


      why people here don't help...

      why....

      Comment

      • Airslash
        New Member
        • Nov 2007
        • 221

        #4
        Can you actually put each seperate header and cpp file that you wrote between CODE tags, because your code is unreadable at the moment

        Comment

        • samimmu
          New Member
          • Mar 2007
          • 32

          #5
          Originally posted by Airslash
          Can you actually put each seperate header and cpp file that you wrote between CODE tags, because your code is unreadable at the moment

          actually the companyt.ccp is the first one

          i will make them bold is it okey? please look at it clearly

          thank for your response.. i really really appreciate it

          Bold means each file and header cpp

          Full code removed per posting guidelines

          Comment

          • Laharl
            Recognized Expert Contributor
            • Sep 2007
            • 849

            #6
            When writing code on these forums, please surround it with [CODE] tags. It makes your code far more readable for everyone. You're a Member now, you're expected to know this.

            Comment

            • samimmu
              New Member
              • Mar 2007
              • 32

              #7
              Originally posted by Laharl
              When writing code on these forums, please surround it with [CODE] tags. It makes your code far more readable for everyone. You're a Member now, you're expected to know this.

              i know.. but not really familiar with it.. i tried the last time but it looked messy..


              thank you anyways for reminding me...


              Can you try to help with that..


              i will really appreciate your help if you can help..

              Comment

              • Airslash
                New Member
                • Nov 2007
                • 221

                #8
                I think you're just using your files wrong...

                List.h : define your List class in here,
                List.cpp : give meaning to your functions: add the code for the methods
                Company.cpp : put here your main.cpp and functions to run the program


                because it looks like you're mixing up stuff in your files.

                Comment

                • samimmu
                  New Member
                  • Mar 2007
                  • 32

                  #9
                  Originally posted by Airslash
                  I think you're just using your files wrong...

                  List.h : define your List class in here,
                  List.cpp : give meaning to your functions: add the code for the methods
                  Company.cpp : put here your main.cpp and functions to run the program


                  because it looks like you're mixing up stuff in your files.

                  that what i did but when i try to input to the file, i coudn't input to the file, it give white message?


                  can u try to compile it and tell me the error please

                  i really need your help urgently

                  thank you very much


                  Sami Alkindi

                  Comment

                  • weaknessforcats
                    Recognized Expert Expert
                    • Mar 2007
                    • 9214

                    #10
                    So how is this compiling?
                    [code=cpp]

                    Node=&head; // it point to the head of the list or to the begining of the list;
                    // empolyee_count= 108;
                    do
                    {
                    //h
                    [/code]

                    Node is a node* and head is a node* That makes &head a node**. You can't assign a node** to a node*.

                    What gives here?

                    Comment

                    • samimmu
                      New Member
                      • Mar 2007
                      • 32

                      #11
                      Originally posted by weaknessforcats
                      So how is this compiling?
                      [code=cpp]

                      Node=&head; // it point to the head of the list or to the begining of the list;
                      // empolyee_count= 108;
                      do
                      {
                      //h
                      [/code]

                      Node is a node* and head is a node* That makes &head a node**. You can't assign a node** to a node*.

                      What gives here?

                      then tell me please how to figure it out...

                      i tried to make it

                      Node=head->next; it also the same

                      please help me

                      Comment

                      • samimmu
                        New Member
                        • Mar 2007
                        • 32

                        #12
                        hello.. anybody can do a little help...



                        any ?

                        Comment

                        • newb16
                          Contributor
                          • Jul 2008
                          • 687

                          #13
                          Originally posted by samimmu
                          Node=head->next; it also the same
                          What is the same? Compiler error? Wrong program behavior? Did you try do debug it?
                          did you try no isolate the pro.. oh well never mind

                          Comment

                          Working...