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. C / C++ / MFC
  4. Matching function for the code

Matching function for the code

Scheduled Pinned Locked Moved C / C++ / MFC
graphicsalgorithmsquestion
5 Posts 4 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.
  • W Offline
    W Offline
    Waldemar Ork
    wrote on last edited by
    #1

    Hi, Everybody, In the code underneath the compiler says there's no matching function for GetNextComb.I marked the place where it refuses to compile the programme. What should I do ? #include <cstdlib> #include "IndexCombination.h" #include <iostream> #include <string> #include <vector> #include <algorithm> #include <iterator> #include <map> #include <sstream> using namespace std; using namespace stdcomb;       struct Element {    char name[6];    int numbers[30];    char chain[90]; }; const Element elements[] = {    {          "ia11",          {3,9,17,21,24,31,33,36,42,49,4,8,19,22,28,30,34,39,43,47,2,6,10,13,14,25,29,37,38,46},          "3,9,17,21,24,31,33,36,42,49,4,8,19,22,28,30,34,39,43,47,2,6,10,13,14,25,29,37,38,46"    }, {          "ia34",          {1,6,12,15,22,27,31,32,41,42,4,7,14,17,23,30,33,36,45,48,2,9,13,18,21,26,34,39,44,49},          "1,6,12,15,22,27,31,32,41,42,4,7,14,17,23,30,33,36,45,48,2,9,13,18,21,26,34,39,44,49"    }, {          "ia72",          {3,8,11,18,22,25,36,37,43,46,1,6,16,17,23,28,35,40,41,44,2,5,12,19,24,27,31,34,42,49},          "3,8,11,18,22,25,36,37,43,46,1,6,16,17,23,28,35,40,41,44,2,5,12,19,24,27,31,34,42,49"    }, {          "ia167",          {3,4,12,15,21,28,32,39,47,48,6,9,16,17,29,30,31,38,41,42,7,8,11,20,26,27,34,35,45,46},          "3,4,12,15,21,28,32,39,47,48,6,9,16,17,29,30,31,38,41,42,7,8,11,20,26,27,34,35,45,46"    }, {          "ia190",          {3,10,11,14,22,23,32,35,43,44,6,9,16,19,24,29,37,38,45,48,2,5,13,18,25,30,31,40,41,0},          "3,10,11,14,22,23,32,35,43,44,6,9,16,19,24,29,37,38,45,48,2,5,13,18,25,30,31,40,41,0"    }, {          "ia21",          {2,5,16,19,25,30,34,39,45,48,1,9,12,13,21,24,33,36,44,49,3,8,15,20,23,26,35,40,43,46},          "

    S M S 3 Replies Last reply
    0
    • W Waldemar Ork

      Hi, Everybody, In the code underneath the compiler says there's no matching function for GetNextComb.I marked the place where it refuses to compile the programme. What should I do ? #include <cstdlib> #include "IndexCombination.h" #include <iostream> #include <string> #include <vector> #include <algorithm> #include <iterator> #include <map> #include <sstream> using namespace std; using namespace stdcomb;       struct Element {    char name[6];    int numbers[30];    char chain[90]; }; const Element elements[] = {    {          "ia11",          {3,9,17,21,24,31,33,36,42,49,4,8,19,22,28,30,34,39,43,47,2,6,10,13,14,25,29,37,38,46},          "3,9,17,21,24,31,33,36,42,49,4,8,19,22,28,30,34,39,43,47,2,6,10,13,14,25,29,37,38,46"    }, {          "ia34",          {1,6,12,15,22,27,31,32,41,42,4,7,14,17,23,30,33,36,45,48,2,9,13,18,21,26,34,39,44,49},          "1,6,12,15,22,27,31,32,41,42,4,7,14,17,23,30,33,36,45,48,2,9,13,18,21,26,34,39,44,49"    }, {          "ia72",          {3,8,11,18,22,25,36,37,43,46,1,6,16,17,23,28,35,40,41,44,2,5,12,19,24,27,31,34,42,49},          "3,8,11,18,22,25,36,37,43,46,1,6,16,17,23,28,35,40,41,44,2,5,12,19,24,27,31,34,42,49"    }, {          "ia167",          {3,4,12,15,21,28,32,39,47,48,6,9,16,17,29,30,31,38,41,42,7,8,11,20,26,27,34,35,45,46},          "3,4,12,15,21,28,32,39,47,48,6,9,16,17,29,30,31,38,41,42,7,8,11,20,26,27,34,35,45,46"    }, {          "ia190",          {3,10,11,14,22,23,32,35,43,44,6,9,16,19,24,29,37,38,45,48,2,5,13,18,25,30,31,40,41,0},          "3,10,11,14,22,23,32,35,43,44,6,9,16,19,24,29,37,38,45,48,2,5,13,18,25,30,31,40,41,0"    }, {          "ia21",          {2,5,16,19,25,30,34,39,45,48,1,9,12,13,21,24,33,36,44,49,3,8,15,20,23,26,35,40,43,46},          "

      S Offline
      S Offline
      Selvam R
      wrote on last edited by
      #2

      try to move the following line to outside main function

      bool GetNextComb( std::vector<unsigned int> &vi );

      Thanks and Regards, Selvam, http://www.wincpp.com

      1 Reply Last reply
      0
      • W Waldemar Ork

        Hi, Everybody, In the code underneath the compiler says there's no matching function for GetNextComb.I marked the place where it refuses to compile the programme. What should I do ? #include <cstdlib> #include "IndexCombination.h" #include <iostream> #include <string> #include <vector> #include <algorithm> #include <iterator> #include <map> #include <sstream> using namespace std; using namespace stdcomb;       struct Element {    char name[6];    int numbers[30];    char chain[90]; }; const Element elements[] = {    {          "ia11",          {3,9,17,21,24,31,33,36,42,49,4,8,19,22,28,30,34,39,43,47,2,6,10,13,14,25,29,37,38,46},          "3,9,17,21,24,31,33,36,42,49,4,8,19,22,28,30,34,39,43,47,2,6,10,13,14,25,29,37,38,46"    }, {          "ia34",          {1,6,12,15,22,27,31,32,41,42,4,7,14,17,23,30,33,36,45,48,2,9,13,18,21,26,34,39,44,49},          "1,6,12,15,22,27,31,32,41,42,4,7,14,17,23,30,33,36,45,48,2,9,13,18,21,26,34,39,44,49"    }, {          "ia72",          {3,8,11,18,22,25,36,37,43,46,1,6,16,17,23,28,35,40,41,44,2,5,12,19,24,27,31,34,42,49},          "3,8,11,18,22,25,36,37,43,46,1,6,16,17,23,28,35,40,41,44,2,5,12,19,24,27,31,34,42,49"    }, {          "ia167",          {3,4,12,15,21,28,32,39,47,48,6,9,16,17,29,30,31,38,41,42,7,8,11,20,26,27,34,35,45,46},          "3,4,12,15,21,28,32,39,47,48,6,9,16,17,29,30,31,38,41,42,7,8,11,20,26,27,34,35,45,46"    }, {          "ia190",          {3,10,11,14,22,23,32,35,43,44,6,9,16,19,24,29,37,38,45,48,2,5,13,18,25,30,31,40,41,0},          "3,10,11,14,22,23,32,35,43,44,6,9,16,19,24,29,37,38,45,48,2,5,13,18,25,30,31,40,41,0"    }, {          "ia21",          {2,5,16,19,25,30,34,39,45,48,1,9,12,13,21,24,33,36,44,49,3,8,15,20,23,26,35,40,43,46},          "

        M Offline
        M Offline
        Maximilien
        wrote on last edited by
        #3

        You probably need to define the GetNextComb function; here you simply declared it (and the declaration should be out of the "main" function.

        This signature was proudly tested on animals.

        1 Reply Last reply
        0
        • W Waldemar Ork

          Hi, Everybody, In the code underneath the compiler says there's no matching function for GetNextComb.I marked the place where it refuses to compile the programme. What should I do ? #include <cstdlib> #include "IndexCombination.h" #include <iostream> #include <string> #include <vector> #include <algorithm> #include <iterator> #include <map> #include <sstream> using namespace std; using namespace stdcomb;       struct Element {    char name[6];    int numbers[30];    char chain[90]; }; const Element elements[] = {    {          "ia11",          {3,9,17,21,24,31,33,36,42,49,4,8,19,22,28,30,34,39,43,47,2,6,10,13,14,25,29,37,38,46},          "3,9,17,21,24,31,33,36,42,49,4,8,19,22,28,30,34,39,43,47,2,6,10,13,14,25,29,37,38,46"    }, {          "ia34",          {1,6,12,15,22,27,31,32,41,42,4,7,14,17,23,30,33,36,45,48,2,9,13,18,21,26,34,39,44,49},          "1,6,12,15,22,27,31,32,41,42,4,7,14,17,23,30,33,36,45,48,2,9,13,18,21,26,34,39,44,49"    }, {          "ia72",          {3,8,11,18,22,25,36,37,43,46,1,6,16,17,23,28,35,40,41,44,2,5,12,19,24,27,31,34,42,49},          "3,8,11,18,22,25,36,37,43,46,1,6,16,17,23,28,35,40,41,44,2,5,12,19,24,27,31,34,42,49"    }, {          "ia167",          {3,4,12,15,21,28,32,39,47,48,6,9,16,17,29,30,31,38,41,42,7,8,11,20,26,27,34,35,45,46},          "3,4,12,15,21,28,32,39,47,48,6,9,16,17,29,30,31,38,41,42,7,8,11,20,26,27,34,35,45,46"    }, {          "ia190",          {3,10,11,14,22,23,32,35,43,44,6,9,16,19,24,29,37,38,45,48,2,5,13,18,25,30,31,40,41,0},          "3,10,11,14,22,23,32,35,43,44,6,9,16,19,24,29,37,38,45,48,2,5,13,18,25,30,31,40,41,0"    }, {          "ia21",          {2,5,16,19,25,30,34,39,45,48,1,9,12,13,21,24,33,36,44,49,3,8,15,20,23,26,35,40,43,46},          "

          S Offline
          S Offline
          Stuart Dootson
          wrote on last edited by
          #4

          The way you use GetNextComb, it's a method of CIdxComb. Your forward declaration (bool GetNextComb(std::vector<unsigned int> &vi);) is for a free function, not a method of CIdxComb. So, you need to add GetNextComb to the definition of CIdxComb.

          Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

          W 1 Reply Last reply
          0
          • S Stuart Dootson

            The way you use GetNextComb, it's a method of CIdxComb. Your forward declaration (bool GetNextComb(std::vector<unsigned int> &vi);) is for a free function, not a method of CIdxComb. So, you need to add GetNextComb to the definition of CIdxComb.

            Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

            W Offline
            W Offline
            Waldemar Ork
            wrote on last edited by
            #5

            It looks like adding GetNextComb to the definition of CIdxComb doesn't solve anything. The compiler still wants a function. It's apparent that the problem is more complicated than I expected. Another evidence is that anybody can figure out how to write this section of the code. However, great thanks to everybody!

            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