Hi guys, brand new to the forum, and programming in general.
I just started learning how to use c++ this week, and wanted to make a console application to help my 5 year old with her sight words. basically what i wanted was to have output "Enter a sight word:" then have a list of her sight words to where she could enter any of them and either tell her YAY! or Try again. I'm too new at this to figure it out on my own, so I'm asking for some assistance on what i need to do. Any help would be greatly appreciated! Thanks
I don't know what a "sight word" is, but I think you're asking for a program that shows a list of words, and then accepts input, and if the input matches one of the words, the output is YAY!, and if the input does not match, the output is "Try Again". Is that what you're asking?
right, thats what im looking to do, except i dont want her to see the list of words, she needs to spell them out. does that make sense?
btw, she has 10 sight words to date. she gets 5 new words every week, so i will need to be able to add them to the list.
just wondering, is there a way to ignore the first letter case? for example to make this available to an older group who would possibly think they should capitalize the first letter but you don't want to have to duplicate each word throughout the program.
Here's something to get you started. You can add in a menu to chose categories or even make it point based like a game. Could even remove words as they are found so the list to chose from get's smaller
Anthony, i copied pasted this and all i got was closing press any key to continue. Maybe i did the word_file.txt wrong?
Also, is there a way to add audio to the code ie output Yay! has a ta-da trumpet sound and Try again does a womp womp wooooommmm? once again, total noob to this and it may be above my pay grade at the moment...
Sorry I should have put in a notification of a file not being opened. If you're running the executable then you put the file in the same folder. If you're running the program through an IDE then you need to put it somewhere the debugger is looking. For Visual Studios 2010 it goes in the project folder- One up from the debug folder.
Sound is supported through the windows libraries.
If you want a sound file to be played do this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#pragma comment(lib, "winmm.lib")
//plays sound and continues execution without waiting for sound to stop
PlaySound(TEXT("file_name.wav"), NULL, SND_ASYNC);
//plays sound file on loop. "background music"
PlaySound(TEXT("file_name.wav"), NULL, SND_ASYNC | SND_LOOP);
//Stops music that is currently playing
PlaySound(NULL, 0, 0);
I think it might have to be .wav for it to work. Wouldn't hurt to try .mp3
Sound files go in the same file directory as your text file. For testing purposes make your paths to these files like this:"c:\\Sound_file.wav"
That way you know exactly where they are on the hard drive until you figure out where to put them for your local executable
Will do. Last night i was watching videos on youtube, made by krashcourse, and they really helped me understand more of the language than anything i have read so far. Im going to study the code, and check out the resources you've provided, and hopefully one day i could do something like this for someone else.