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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Program Involving Many changing strings, library’s, and or databases and files?

Program Involving Many changing strings, library’s, and or databases and files?

Scheduled Pinned Locked Moved C / C++ / MFC
helptutoriallearningcomgame-dev
10 Posts 4 Posters 0 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.
  • C Offline
    C Offline
    Craig McRae
    wrote on last edited by
    #1

    Hello all, this is my first post, so I'll start off by saying that I began programming about a month and a half ago, and being a "math person" it was mostly intuitive to me. So I would classify myslef somewhere in-between beginner and average. Anyway, My English teacher brought up a "Game" where you pick two words. And using dictionary definitions of one word, you have to pick a word in the definition, go to it, find its definition, and so on and so forth until you finally reach the second word you picked. For example: Pick the words Finesse and Aggregate Using Dictionary.com (Just using the most convenient resource) the definition of Finesse is Extreme delicacy or subtlety in action, performance, skill, discrimination, taste. So I go to extreme, and it is defined as Of a character or kind farthest removed from the ordinary or average: extreme measures. So I go to Character, which is defined as The aggregate of features and traits that form the individual nature of some person or thing. And Thus I have reached Aggregate! My point in all this is that I would like to write a program do be able to play the game. This could often take a long time, but I hope you see the point of the "program in my head." The goal of the program would be to find and display the shortest possible path from one word to another. My problem is that I HAVE NO IDEA HOW TO START THIS HELP. Or at least that's how I feel. If anyone can help me in the slightest, it would be great! Also I feel the program would be simpler if It were written using synonyms and a thesaurus, and if you think there is a better programming language to write this in, feel free to suggest it! Thanks in advance! :)

    G J L 4 Replies Last reply
    0
    • C Craig McRae

      Hello all, this is my first post, so I'll start off by saying that I began programming about a month and a half ago, and being a "math person" it was mostly intuitive to me. So I would classify myslef somewhere in-between beginner and average. Anyway, My English teacher brought up a "Game" where you pick two words. And using dictionary definitions of one word, you have to pick a word in the definition, go to it, find its definition, and so on and so forth until you finally reach the second word you picked. For example: Pick the words Finesse and Aggregate Using Dictionary.com (Just using the most convenient resource) the definition of Finesse is Extreme delicacy or subtlety in action, performance, skill, discrimination, taste. So I go to extreme, and it is defined as Of a character or kind farthest removed from the ordinary or average: extreme measures. So I go to Character, which is defined as The aggregate of features and traits that form the individual nature of some person or thing. And Thus I have reached Aggregate! My point in all this is that I would like to write a program do be able to play the game. This could often take a long time, but I hope you see the point of the "program in my head." The goal of the program would be to find and display the shortest possible path from one word to another. My problem is that I HAVE NO IDEA HOW TO START THIS HELP. Or at least that's how I feel. If anyone can help me in the slightest, it would be great! Also I feel the program would be simpler if It were written using synonyms and a thesaurus, and if you think there is a better programming language to write this in, feel free to suggest it! Thanks in advance! :)

      G Offline
      G Offline
      Garth J Lancaster
      wrote on last edited by
      #2

      I'd break it down into units/chunks of work, each unit/chunk exploring one small aspect your first one may be to be able to use a html query to a website like http://dictionary-api.cambridge.org/index.php/help/resources#c#[^] to get a definition for a word and display it - could be console or forms based Once you know how the data comes back, you then have to be able to parse/render it into a form you can use for matching - and possibly store it in memory btw, I showed the c# api for that dictionary - 'better programming language' ? I don't know - there's this big thing about abstraction and using the right language/tool for the job - sometimes like this dictionary api, you may not find an api for your language - that doesn't stop you from having a mixed component approach - I think c# would also be ok for this project - it'll just take you longer to do 'this bit' in c++ since they don't supply an api - so you'd have to model the java or Objective-C one. So, I'd start in an 'agile' frame of mind, small steps, refined, combined - I don't think the big issue here is getting the dictionary definitions, its the matching - so you may need to think about storing dictionary results in memory or some other appropriate form so you can develop an algorithm for matching and/or retrieving more dictionary entries - and also 'backtracking' if you come to a dead end

      C 2 Replies Last reply
      0
      • C Craig McRae

        Hello all, this is my first post, so I'll start off by saying that I began programming about a month and a half ago, and being a "math person" it was mostly intuitive to me. So I would classify myslef somewhere in-between beginner and average. Anyway, My English teacher brought up a "Game" where you pick two words. And using dictionary definitions of one word, you have to pick a word in the definition, go to it, find its definition, and so on and so forth until you finally reach the second word you picked. For example: Pick the words Finesse and Aggregate Using Dictionary.com (Just using the most convenient resource) the definition of Finesse is Extreme delicacy or subtlety in action, performance, skill, discrimination, taste. So I go to extreme, and it is defined as Of a character or kind farthest removed from the ordinary or average: extreme measures. So I go to Character, which is defined as The aggregate of features and traits that form the individual nature of some person or thing. And Thus I have reached Aggregate! My point in all this is that I would like to write a program do be able to play the game. This could often take a long time, but I hope you see the point of the "program in my head." The goal of the program would be to find and display the shortest possible path from one word to another. My problem is that I HAVE NO IDEA HOW TO START THIS HELP. Or at least that's how I feel. If anyone can help me in the slightest, it would be great! Also I feel the program would be simpler if It were written using synonyms and a thesaurus, and if you think there is a better programming language to write this in, feel free to suggest it! Thanks in advance! :)

        G Offline
        G Offline
        Garth J Lancaster
        wrote on last edited by
        #3

        (My internet connection is a bit 'flaky') I'd do some test results on getting dictionary results, look at the results, print them out etc and do a lot of sketches on paper on how to match them Keep a notebook - write down your ideas, what works, what hasn't, so you can go back a step if you need - or show mates/the teacher if you need help on 'thought processes' you said you didn't know how to start ? you already have - you've looked at a task and started breaking it down into do-able steps - that's the way its done in the real world too :-) (along with study, research, persererance ...) have fun

        C 1 Reply Last reply
        0
        • C Craig McRae

          Hello all, this is my first post, so I'll start off by saying that I began programming about a month and a half ago, and being a "math person" it was mostly intuitive to me. So I would classify myslef somewhere in-between beginner and average. Anyway, My English teacher brought up a "Game" where you pick two words. And using dictionary definitions of one word, you have to pick a word in the definition, go to it, find its definition, and so on and so forth until you finally reach the second word you picked. For example: Pick the words Finesse and Aggregate Using Dictionary.com (Just using the most convenient resource) the definition of Finesse is Extreme delicacy or subtlety in action, performance, skill, discrimination, taste. So I go to extreme, and it is defined as Of a character or kind farthest removed from the ordinary or average: extreme measures. So I go to Character, which is defined as The aggregate of features and traits that form the individual nature of some person or thing. And Thus I have reached Aggregate! My point in all this is that I would like to write a program do be able to play the game. This could often take a long time, but I hope you see the point of the "program in my head." The goal of the program would be to find and display the shortest possible path from one word to another. My problem is that I HAVE NO IDEA HOW TO START THIS HELP. Or at least that's how I feel. If anyone can help me in the slightest, it would be great! Also I feel the program would be simpler if It were written using synonyms and a thesaurus, and if you think there is a better programming language to write this in, feel free to suggest it! Thanks in advance! :)

          J Offline
          J Offline
          jschell
          wrote on last edited by
          #4

          Craig McRae wrote:

          The goal of the program would be to find and display the shortest possible path from one word to another.

          There is a whole area of math devoted to the study of this.

          Craig McRae wrote:

          So I would classify myslef somewhere in-between beginner and average.

          Excluding the above I would expect that you are going to get more out of this just by doing it yourself. There is a lot of 'ideas' to be explored, for example - Where do you get the dictionary - Can there be more than one dictionary - Is it legal to use the dictionary - How to access the dictionary - How do you make sure it doesn't take 'too long'.

          1 Reply Last reply
          0
          • G Garth J Lancaster

            (My internet connection is a bit 'flaky') I'd do some test results on getting dictionary results, look at the results, print them out etc and do a lot of sketches on paper on how to match them Keep a notebook - write down your ideas, what works, what hasn't, so you can go back a step if you need - or show mates/the teacher if you need help on 'thought processes' you said you didn't know how to start ? you already have - you've looked at a task and started breaking it down into do-able steps - that's the way its done in the real world too :-) (along with study, research, persererance ...) have fun

            C Offline
            C Offline
            Craig McRae
            wrote on last edited by
            #5

            Thank you thank you! No one else would reply to me on any other forum's, You are awesome! You beautiful person you :)

            1 Reply Last reply
            0
            • G Garth J Lancaster

              I'd break it down into units/chunks of work, each unit/chunk exploring one small aspect your first one may be to be able to use a html query to a website like http://dictionary-api.cambridge.org/index.php/help/resources#c#[^] to get a definition for a word and display it - could be console or forms based Once you know how the data comes back, you then have to be able to parse/render it into a form you can use for matching - and possibly store it in memory btw, I showed the c# api for that dictionary - 'better programming language' ? I don't know - there's this big thing about abstraction and using the right language/tool for the job - sometimes like this dictionary api, you may not find an api for your language - that doesn't stop you from having a mixed component approach - I think c# would also be ok for this project - it'll just take you longer to do 'this bit' in c++ since they don't supply an api - so you'd have to model the java or Objective-C one. So, I'd start in an 'agile' frame of mind, small steps, refined, combined - I don't think the big issue here is getting the dictionary definitions, its the matching - so you may need to think about storing dictionary results in memory or some other appropriate form so you can develop an algorithm for matching and/or retrieving more dictionary entries - and also 'backtracking' if you come to a dead end

              C Offline
              C Offline
              Craig McRae
              wrote on last edited by
              #6

              So on my quest, I downloaded WordWeb, to see if I could dissect it's files and source code to give me a hint or a database to use, but I couldn't find a way to accomplish this on Ubuntu. So my question is, could I somehow tell my program to use word web, and find the path between two words? I'm not asking you to write the algorithm for me, just wondering if there is a way to tell my program to run an executable file and use it, while the code is running. Thanks! (Also I plan to use linux terminal as the interface)

              G 1 Reply Last reply
              0
              • G Garth J Lancaster

                I'd break it down into units/chunks of work, each unit/chunk exploring one small aspect your first one may be to be able to use a html query to a website like http://dictionary-api.cambridge.org/index.php/help/resources#c#[^] to get a definition for a word and display it - could be console or forms based Once you know how the data comes back, you then have to be able to parse/render it into a form you can use for matching - and possibly store it in memory btw, I showed the c# api for that dictionary - 'better programming language' ? I don't know - there's this big thing about abstraction and using the right language/tool for the job - sometimes like this dictionary api, you may not find an api for your language - that doesn't stop you from having a mixed component approach - I think c# would also be ok for this project - it'll just take you longer to do 'this bit' in c++ since they don't supply an api - so you'd have to model the java or Objective-C one. So, I'd start in an 'agile' frame of mind, small steps, refined, combined - I don't think the big issue here is getting the dictionary definitions, its the matching - so you may need to think about storing dictionary results in memory or some other appropriate form so you can develop an algorithm for matching and/or retrieving more dictionary entries - and also 'backtracking' if you come to a dead end

                C Offline
                C Offline
                Craig McRae
                wrote on last edited by
                #7

                Also In a way that the user can't notice word web working in the background

                1 Reply Last reply
                0
                • C Craig McRae

                  So on my quest, I downloaded WordWeb, to see if I could dissect it's files and source code to give me a hint or a database to use, but I couldn't find a way to accomplish this on Ubuntu. So my question is, could I somehow tell my program to use word web, and find the path between two words? I'm not asking you to write the algorithm for me, just wondering if there is a way to tell my program to run an executable file and use it, while the code is running. Thanks! (Also I plan to use linux terminal as the interface)

                  G Offline
                  G Offline
                  Garth J Lancaster
                  wrote on last edited by
                  #8

                  yikes - I guess this is what you meant by posting on multiple forums which is cough, a no no ... but as it is, I assumed you were on windows - if I had to do it this way in windows, I would create a process with a hidden window perhaps to run Word Web - but on Ubuntu ? I guessing (depending on what language you are using) there's a way of doing it, but I'd have to 'JFGI' .. [J]ust [F]arken [G]oogle [I]t Even on Ubuntu, using something like Perl would work with that dictionary I suggested - or any other language capable of sending a HTTP request to a server - I wouldn't use the 'start another program' method unless there was absolutely no other way

                  C 1 Reply Last reply
                  0
                  • G Garth J Lancaster

                    yikes - I guess this is what you meant by posting on multiple forums which is cough, a no no ... but as it is, I assumed you were on windows - if I had to do it this way in windows, I would create a process with a hidden window perhaps to run Word Web - but on Ubuntu ? I guessing (depending on what language you are using) there's a way of doing it, but I'd have to 'JFGI' .. [J]ust [F]arken [G]oogle [I]t Even on Ubuntu, using something like Perl would work with that dictionary I suggested - or any other language capable of sending a HTTP request to a server - I wouldn't use the 'start another program' method unless there was absolutely no other way

                    C Offline
                    C Offline
                    Craig McRae
                    wrote on last edited by
                    #9

                    haha sorry, I just wanted the answer asap... Okay thanks for your help :)

                    1 Reply Last reply
                    0
                    • C Craig McRae

                      Hello all, this is my first post, so I'll start off by saying that I began programming about a month and a half ago, and being a "math person" it was mostly intuitive to me. So I would classify myslef somewhere in-between beginner and average. Anyway, My English teacher brought up a "Game" where you pick two words. And using dictionary definitions of one word, you have to pick a word in the definition, go to it, find its definition, and so on and so forth until you finally reach the second word you picked. For example: Pick the words Finesse and Aggregate Using Dictionary.com (Just using the most convenient resource) the definition of Finesse is Extreme delicacy or subtlety in action, performance, skill, discrimination, taste. So I go to extreme, and it is defined as Of a character or kind farthest removed from the ordinary or average: extreme measures. So I go to Character, which is defined as The aggregate of features and traits that form the individual nature of some person or thing. And Thus I have reached Aggregate! My point in all this is that I would like to write a program do be able to play the game. This could often take a long time, but I hope you see the point of the "program in my head." The goal of the program would be to find and display the shortest possible path from one word to another. My problem is that I HAVE NO IDEA HOW TO START THIS HELP. Or at least that's how I feel. If anyone can help me in the slightest, it would be great! Also I feel the program would be simpler if It were written using synonyms and a thesaurus, and if you think there is a better programming language to write this in, feel free to suggest it! Thanks in advance! :)

                      L Offline
                      L Offline
                      leon de boer
                      wrote on last edited by
                      #10

                      We have a modern name for this game its call "the six degrees of Kevin Bacon" You will find the background to the game by a simple google search that you can link Kevin Bacon to any other actor/actress in Holywood by no more than six films they have all acted in. You will also find extensive lists on computer programming student assignments of how to program it and strategies as it is quite a common teaching game.

                      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