News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

'fprint' was not declared in this scope|

Started by petec, March 28, 2019, 04:26:17 AM

Previous topic - Next topic

petec

When I try to build I get the error below:

main.cpp|18|error: 'fprint' was not declared in this scope|

My code includes:
#include <stdio.h>

I found 3 files named stdio.h in the Code::Blocks directorys.
None of them have fprint in them.
I am using Code::Blocks 17.12 on Windows 8.1
I'm not going to live long enough to do all I want to do.

oBFusCATed

https://en.cppreference.com/w/cpp/io/c/fprintf

Next time please use a search engine... And read the rules of the forum before posting...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

petec

I don't think it is appropriate for you to chastise me for not using search engines,
I searched and followed the links including stackoverflow and couldn't find a solution.

Now, tell me, what was I supposed to find in that link you gave me that would solve my problem!  I read it top to bottom three times.

I also did a ctrl-f on the page and searched it for "declared" and "scope" and neither words are on the page.

Big help you are!

Pete
I'm not going to live long enough to do all I want to do.

sodev

I'm afraid no one can help you. Not even Google. If you can't see after reading the page three times that the function is called fprintf, maybe visit a doctor?

raynebc

It was appropriate for you to be chastised, as you ignored the purpose of this forum as a resource for help using the IDE and not programming help in general.  Keep practicing and you'll learn to be able to solve these issues yourself.

petec

Well, explain why this exact code compiles on my raspberry pi but not on Windows 8.1.

That is why I assumed it was something to do with codeblocks not the code.
I'm not going to live long enough to do all I want to do.

stahta01

Quote from: petec on March 30, 2019, 03:16:07 AM
Well, explain why this exact code compiles on my raspberry pi but not on Windows 8.1.

That is why I assumed it was something to do with codeblocks not the code.

Learn the name and version of the Compiler being used on both systems.
Then, try building the code with the same mistyping on both systems.

NOTE: Code::Blocks is not an Compiler! Read the CB FAQs.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]