Share via

error C2664: 'fprintf' cannot convert parameter 1 from 'FILE' to 'FILE *' during MS VS build process (Visual C+ compilation)

Anonymous
2014-10-29T17:13:23+00:00

I am unable to compile the 'fprintf' instruction in MS Visual C++; I receive the error C2664: cannot convert parameter 1 from 'FILE' to 'FILE *'. This is confusing because 'parameter 1' is defined as a link to the 'FILE' structure. I referenced the Microsoft article: "fprintf, fwprintf Visual Studio 6.0"

In Microsoft articles on related subjects, including, 'fopen_s, _wfopen_s' (for Visual Studio 2013),, 'fopen, _wfopen", and 'fgets, fgetws', 'FILE' is used as a separate statement. There seems to be some differences in the ways the pointers used in these Visual C++ instruction documentation is used, principally in the ways the pointer is used to point to thje 'FILE' structure. Also, I have not found an article in the Microsoft knowledge base or any Microsoft Community post that addresses anything close to this subject.  If there is not a direct solution to this question, maybe somebody could recommend a different method of writing text onto an external file besides using 'fprintf'.

Windows for home | Previous Windows versions | Apps

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2014-10-30T11:52:23+00:00

    Hi Gordon,

    Thank you for posting in Microsoft Community Forum.

    Please be assured that we would do our best to assist you.

    I would suggest you to post your query on the below mentioned, where we have experts in Visual C++.

    https://social.msdn.microsoft.com/Forums/en-US/home

    Hope this information is helpful. Please do let us know if you need further assistance, we’ll be glad to assist you.

    Was this answer helpful?

    0 comments No comments