Hello everyone! I am small, and meet again Ah, there is a saying "together is the edge." Since we are destined to meet here, I hope you have a certain understanding and understanding, but also can pay attention to the small part, so that will not get lost Oh, hope that in the days to come we can continue to encourage each other and grow together. In the flowering season and the rainy season has our deepest friendship, also very happy you can open this article, I hope everyone will help each other in study. Well, today's theme is: C language combined with VB to realize the function of reading aloud.
The Knowledge system
It's basically a C-language bucket.
That's it:
Basic framework of C language
C language Input and output
C Language File operations
C Language System functions
VBS directive: CreateObject ("SAPI. SpVoice "). Speak "I Love You"
Basic framework of C language
1. header file #include
2. Main function: main function
So easy that is impossible, this life is impossible.
C language Input and output
1.printf function, it is enough to master the print as it is and the string to print.
2.scanf function (This function is not required.) )
C Language File operations
Basic file Operation:
1. Open File: fopen function
2. Format write operation: fprintf function
3. Close the file to
C Language System functions
1. Header file contains: #include
2. Learn the system mechanism, you can return the instructions to the DOS system
3. Adjust the window style
At least let your window take a color, like a person
VBS INSTRUCTIONS
Directive: CreateObject ("SAPI. SpVoice "). Speak "I Love You", in fact, is a VBS instructions, self-brain repair, do not know to find degrees Niang
Usage: Write TXT file, change txt file suffix to vbs and you can run it by double-clicking it. You can put I love all out oh, it's so simple.
Thus the whole project can be written out.
Project Source
header files and global variables
Adjust window styles
Very simple, command yourself Baidu under the good
Accept user Input
It's just an input function.
Main function file operation
Are you tired of looking at the code? C + + Learning Park Self-download, after running it does not feel tired yo
Well, good times are always so fast, read, go to the code to run, see if you can make the program sound Oh, if this is your first pronunciation program, then congratulations OH
C language combined with VBS scripting to write a small tool to be able to pronounce a C language program