Author Topic: 'fprint' was not declared in this scope|  (Read 4566 times)

Offline petec

  • Single posting newcomer
  • *
  • Posts: 5
'fprint' was not declared in this scope|
« on: March 28, 2019, 04:26:17 am »
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: 'fprint' was not declared in this scope|
« Reply #1 on: March 28, 2019, 08:37:55 am »
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!]

Offline petec

  • Single posting newcomer
  • *
  • Posts: 5
Re: 'fprint' was not declared in this scope|
« Reply #2 on: March 29, 2019, 03:10:08 am »
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.

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: 'fprint' was not declared in this scope|
« Reply #3 on: March 29, 2019, 04:41:04 am »
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?

Offline raynebc

  • Almost regular
  • **
  • Posts: 217
Re: 'fprint' was not declared in this scope|
« Reply #4 on: March 29, 2019, 04:57:46 pm »
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.

Offline petec

  • Single posting newcomer
  • *
  • Posts: 5
Re: 'fprint' was not declared in this scope|
« Reply #5 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.
I'm not going to live long enough to do all I want to do.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: 'fprint' was not declared in this scope|
« Reply #6 on: March 30, 2019, 04:05:21 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++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org