Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Declaration terminated incorrectly

Declaration terminated incorrectly

Scheduled Pinned Locked Moved Managed C++/CLI
help
4 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pramitha P Kamath
    wrote on last edited by
    #1

    My program is showing "Declaration Terminated incorrectly".Please help........ #include #include #include #include #include #include void stock(); void billing(); class SBILL { int slno; int itemcode; char name[50]; float quantity; float price; float ttlprice; float taxrate; float amt; public: void subenter() { cout<<"\nEnter the following details:" <<"\n\tItemCode\t:\n\t\t"; cin>>itemcode; cout<<"\n\tName\t:\n\t\t"; gets(name); cout<<"\n\tQuantity\t:\n\t\t"; cin>>quantity; cout<<"\n\tTax rate\t:\n\t\t"; cin>>taxrate; subcalculate(); } void subdisplay() { cout<<"\n"<>itemcode; cout<<"\n\tCustomer name\t:\n\t\t"; gets(cusname); void dis1() { cout<<"\nBILL CODE\t:"<>sitemcode; cout<<"\n\tItem Name\t:\n\t\t"; gets(sitemname); cout<<"\n\tQuantity\t:\n\t\t"; cin>>squantity; cout<<"\n\tPrice\t:\n\t\t"; cin>>sprice; cout<<"\n\tTax rate\t:\n\t\t"; cin>>staxrate; } void display() { cout<<"\n"<

    L 2 Replies Last reply
    0
    • P Pramitha P Kamath

      My program is showing "Declaration Terminated incorrectly".Please help........ #include #include #include #include #include #include void stock(); void billing(); class SBILL { int slno; int itemcode; char name[50]; float quantity; float price; float ttlprice; float taxrate; float amt; public: void subenter() { cout<<"\nEnter the following details:" <<"\n\tItemCode\t:\n\t\t"; cin>>itemcode; cout<<"\n\tName\t:\n\t\t"; gets(name); cout<<"\n\tQuantity\t:\n\t\t"; cin>>quantity; cout<<"\n\tTax rate\t:\n\t\t"; cin>>taxrate; subcalculate(); } void subdisplay() { cout<<"\n"<>itemcode; cout<<"\n\tCustomer name\t:\n\t\t"; gets(cusname); void dis1() { cout<<"\nBILL CODE\t:"<>sitemcode; cout<<"\n\tItem Name\t:\n\t\t"; gets(sitemname); cout<<"\n\tQuantity\t:\n\t\t"; cin>>squantity; cout<<"\n\tPrice\t:\n\t\t"; cin>>sprice; cout<<"\n\tTax rate\t:\n\t\t"; cin>>staxrate; } void display() { cout<<"\n"<

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Did you really think that it's necessary to dump your entire unformatted code base here and expect us to guess where you are getting this error message? [Edit] You have several problems going on here. You have many for statements that are simply

      for (i = 0; i>cde;

      a couple of which appear to have no purpose. Your nested class declaration is incomplete. Your include statements are missing. You are declaring functions inside other functions. This has nothing to do with C++/CLI probably others. [/Edit]

      You can lead a developer to CodeProject, but you can't make them think. The Theory of Gravity was invented for the sole purpose of distracting you from investigating the scientific fact that the Earth sucks.

      P 1 Reply Last reply
      0
      • L Lost User

        Did you really think that it's necessary to dump your entire unformatted code base here and expect us to guess where you are getting this error message? [Edit] You have several problems going on here. You have many for statements that are simply

        for (i = 0; i>cde;

        a couple of which appear to have no purpose. Your nested class declaration is incomplete. Your include statements are missing. You are declaring functions inside other functions. This has nothing to do with C++/CLI probably others. [/Edit]

        You can lead a developer to CodeProject, but you can't make them think. The Theory of Gravity was invented for the sole purpose of distracting you from investigating the scientific fact that the Earth sucks.

        P Offline
        P Offline
        Pramitha P Kamath
        wrote on last edited by
        #3

        Well, thanks for bringing it to my notice.Actually when I copied it into the editor on the website, it looked fine, but after submission edges of the statements were cropped off so was the formatting :confused:like the one u mentioned.I am not able to submit the complete statements.

        1 Reply Last reply
        0
        • P Pramitha P Kamath

          My program is showing "Declaration Terminated incorrectly".Please help........ #include #include #include #include #include #include void stock(); void billing(); class SBILL { int slno; int itemcode; char name[50]; float quantity; float price; float ttlprice; float taxrate; float amt; public: void subenter() { cout<<"\nEnter the following details:" <<"\n\tItemCode\t:\n\t\t"; cin>>itemcode; cout<<"\n\tName\t:\n\t\t"; gets(name); cout<<"\n\tQuantity\t:\n\t\t"; cin>>quantity; cout<<"\n\tTax rate\t:\n\t\t"; cin>>taxrate; subcalculate(); } void subdisplay() { cout<<"\n"<>itemcode; cout<<"\n\tCustomer name\t:\n\t\t"; gets(cusname); void dis1() { cout<<"\nBILL CODE\t:"<>sitemcode; cout<<"\n\tItem Name\t:\n\t\t"; gets(sitemname); cout<<"\n\tQuantity\t:\n\t\t"; cin>>squantity; cout<<"\n\tPrice\t:\n\t\t"; cin>>sprice; cout<<"\n\tTax rate\t:\n\t\t"; cin>>staxrate; } void display() { cout<<"\n"<

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          You forgot the closing brace after function BILLS::enter(). If you formatted your code properly you would be able to spot such errors quite easily.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups