Thread: std::cout under Windows Vista?

  1. #1
    Registered User
    Join Date
    May 2015

    std::cout under Windows Vista?

    I'm using C++, compiled using Microsoft Visual C++ .NET (2003), under Windows XP. I use statements like
    std::cout << "Got to here" << std::endl;
    to debug the program. I've got
    #include <iostream>
    #include <stdio.h>
    #include <stdlib.h>
    at the start of the program. I run the program using a batch file which redirects the output to a file. All works fine.

    Now I take the .exe program and run it on another machine under Windows Vista. When I run it, the output to std::cout fails to appear. Why is that?

    In case it's relevant, the Vista machine has installed Microsoft Visual C++ Toolkit 2003; Microsoft Visual C++ 2005 Express Edition; Microsoft Visual C++ 2008 redistributable; Microsoft Visual C++ 2010 x86 redistributable.

    The program is actually a Delphi Pascal program calling C++ functions. The Pascal bit also produces output. In XP, the Pascal and C++ output are interleaved. In Vista, I only get the Pascal output.

    Thanks for any hints.

  2. #2
    Join Date
    Oct 2007
    Inside my computer
    Sorry, not enough information to even remotely figure out the problem.
    First off, grab Visual Studio 2013 Community Edition. Compile your code. Fix any errors and warnings. Run. Does it still provide the same result? If so, simplify the program as much as you can until the error goes away, then post the entire code here.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Northern Virginia/Washington DC Metropolitan Area
    Is the source computer using static or dynamic linking?
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  4. #4
    Registered User
    Join Date
    May 2015
    I appreciate the responses but the problem has "gone away". The temporary diagnostic COUT output which was disappearing yesterday on my Vista machine is appearing today (possibly versions got mixed up with all the changing and recompiling on my XP machine and transferring on memory stick). And anyway the program is now doing what I want, so I don't actually need the diagnostic output any more. But thanks for your time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Dev C on WIndows Vista
    By Aclan in forum Windows Programming
    Replies: 3
    Last Post: 12-08-2009, 12:49 PM
  2. Differences between Windows XP and Windows Vista programming
    By nathan3011 in forum Windows Programming
    Replies: 3
    Last Post: 01-15-2009, 10:05 AM
  3. Open an excel file from a windows service under Windows Vista
    By AdrianaLuby in forum C# Programming
    Replies: 1
    Last Post: 06-05-2007, 03:55 AM
  4. Which will come first -- Windows Vista or Mac OS X Leopard
    By joeprogrammer in forum A Brief History of
    Replies: 23
    Last Post: 08-09-2006, 05:22 PM
  5. Windows Vista
    By cKoder in forum A Brief History of
    Replies: 32
    Last Post: 08-20-2005, 07:21 PM