Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 636519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:31:27+00:00 2026-05-13T20:31:27+00:00

I am using VC++ 2008 express edition for C. When I try to run

  • 0

I am using VC++ 2008 express edition for C. When I try to run this:

/* Demonstrates printer output. */

#include <stdio.h>

main()
{ 
 float f = 2.0134;

 fprintf(stdprn, "This message is printed.\n\n");
 fprintf(stdprn, "And now some numbers:\n\n");
 fprintf(stdprn, "The square of %f is %f.", f, f*f);

 /* Send a form feed */

 fprintf(stdprn, "\f");
}

I get four of these errors: error C2065: ‘stdprn’ : undeclared identifier.

On this forum, they wrote that it works to define the printer as follows:

FILE *printer;
printer = fopen("PRN", "w");

EDIT
It builds with a warning that fopen is unsafe. When it runs the error appears:

Debug Assertion fails.
File: f:\dd\vctools\crt_bld\self_x86\crt\src\fprintf.c
Line: 55

Expression: (str != NULL)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:31:28+00:00Added an answer on May 13, 2026 at 8:31 pm

    The stdprn stream was an extension provided by Borland compilers – as far as I know, MS have never supported it. Regarding the use of fopen to open the printer device, I don’t think this will work with any recent versions of Windows, but a couple of things to try:

    • use PRN: as the name instead of PRN (note the colon)
    • try opening the specific device using (for example) LPT1: (once again, note the colon). This will of course not work if you don’t have a printer attached.
    • don’t depend on a printer dialog coming up – you are not really using the WIndows printing system when you take this approach (and so it probably won’t solve your problem, but is worth a try).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to connect a C# application (using Visual C# 2008 Express Edition) to
I am using Installshield 2008 Developer Edition and need to run SQL scripts against
Exactly what the title says. I'm using MSVC++ 2008 express, and my class constructor
I am using Visual Studio 2008 Express and I tried creating a simple console
I am using Microsoft Visual Web Developer 2008 Express. I've made an ASP.NET MVC
Hi all I've just started a new project using Visual Web Developer 2008 Express
Using VS2005/2008 as a resource editor, one of the options in the Add Resource
I am using VS 2008 with SP1 and the IE 8 beta 2. Whenever
We are using TFS 2008 for project managmeent and I am looking for a
While generating charts using RS 2008 betas, RC0 and such., I never specified any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.