C language combined with VBS scripting to write a little tool to do a C language program that can pronounce

Source: Internet
Author: User
Tags sapi


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.