I have been trying to integrate the Text-to-Speech Tutorial (SAPI 5.3) from Microsoft msdn site http://msdn.microsoft.com/en-us/library/ms720163%28v=vs.85%29 and just cant figure it out. I am trying to get the program to turn the text it outputs into the cmd window in to speech. Its just a little project I have been working on and any help would be great thanks. I all ready have the #included files I need in the beginning of the code. I am still new at c++ but I am able to write some very neat cmd programs but this Text to speech just stumps me, thanks. just a person trying to learn something new.
The problem is with line 25. Declare nSelection outside of it.
There was also crashing when trying to access an element ouside of Response range. Response is created with '3' elements. Namely 0, 1, 2, 3. But rand() % 5 will give a range of 0 to 4...see the problem ?
I took the liberty to make the changes here :D