Fscanf Return Value

Source: Internet
Author: User

Fscanf returns the number of actually read data. An error occurs or EOF is returned at the end.

 

Char szbuf [512];

Getmodulefilename (null, szbuf, 512 );

* Strrchr (szbuf, '//') = '/0 ';

* Strrchr (szbuf, '//') = '/0 ';

Strcat (szbuf, "// lib // image. lib ");

File * fp = fopen (szbuf, "RT ");

 

Int nimagetype =-1, t = 0;

While (fscanf (FP, "% d % s", & T, & nimagetype, szbuf) = 3)

{

M_cbimagetype.addstring (szbuf );

}

M_cbimagetype.setcursel (2 );

 

Function prototype:
DWORD getmodulefilename (
Hmodule,
Lptstr lpfilename,
DWORD nsize
);
Function parameter description:
Hmodule loadsProgramInstance handle. If this parameter is null, the function returns the full path of the current application.
Lpfilename lptstr is the pointer to the memory block where you store the returned name. It is an output parameter.

Nsize DWORD, the maximum value loaded to the buffer lpfilename

 

* Strrchr (szbuf, '//') returns the value of '//' found, and assigns this value to the following value. Here it is assigned to '/0 ', clear.

Strcat connects szbuf to the value behind it.

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.