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
C

Craig McRae

@Craig McRae
About
Posts
6
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Speed up a square root c++ prog
    C Craig McRae

    Hello All, Could you help me speed up a program? It's designed to find the square root of a number.

    #include

    using namespace std;

    int main()
    {
    float a;
    float c;
    cout << "Square root calculator!" << endl;
    cout << "Enter the number you want to square root" << endl;
    cin >> a;
    cout << "Enter an educated guess" << endl;
    cin >> c;
    cout << "The squareroot of " << a << " is: " << endl;
    do
    c = (c + (a/c))/2;

    while ( c != a/c );

    { cout << c << endl;
    } 
    

    return 0;
    }

    My problem is that it get remarkably slow around 55ish. Any advice it appreciated

    C / C++ / MFC help c++ performance question

  • Program Involving Many changing strings, library’s, and or databases and files?
    C Craig McRae

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

    C / C++ / MFC help tutorial learning com game-dev

  • Program Involving Many changing strings, library’s, and or databases and files?
    C Craig McRae

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

    C / C++ / MFC help tutorial learning com game-dev

  • Program Involving Many changing strings, library’s, and or databases and files?
    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)

    C / C++ / MFC help tutorial learning com game-dev

  • Program Involving Many changing strings, library’s, and or databases and files?
    C Craig McRae

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

    C / C++ / MFC help tutorial learning com game-dev

  • Program Involving Many changing strings, library’s, and or databases and files?
    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! :)

    C / C++ / MFC help tutorial learning com game-dev
  • Login

  • Don't have an account? Register

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