473,395 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How do I use <iostream> in .NET Class Library project?

After creating a new .NET Class Library project, I then add the header file:

#include <iostream>

(I tried adding in my main .cpp file and also tried in stdafx.h file.)

Doesn't work, and I get the following error messages:
LNK2020: unresolved token (0A000006) _CxxThrowException
LNK2020: unresolved token (0A000015) delete
fatal error LNK1120: 2 unresolved externals

I would like to use cout on the un-managed side of things.

I am writing some un-managed code and some managed code together, and so I
would like to use cout and or printf().

Can someone help?

Russell Mangel
Las Vegas, NV
Nov 17 '05 #1
1 1213
you probably might want to read this:

http://support.microsoft.com/default...;en-us;q154419
use :
#include <use_ansi.h> instead...


"Russell Mangel" <ru*****@tymer.net> wrote in message
news:e9**************@TK2MSFTNGP10.phx.gbl...
After creating a new .NET Class Library project, I then add the header file:
#include <iostream>

(I tried adding in my main .cpp file and also tried in stdafx.h file.)

Doesn't work, and I get the following error messages:
LNK2020: unresolved token (0A000006) _CxxThrowException
LNK2020: unresolved token (0A000015) delete
fatal error LNK1120: 2 unresolved externals

I would like to use cout on the un-managed side of things.

I am writing some un-managed code and some managed code together, and so I
would like to use cout and or printf().

Can someone help?

Russell Mangel
Las Vegas, NV

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: John Tiger | last post by:
Can anybody have idea about the difference between #include <iostream.h> and #include <iostream>. Is later one valid statement on any compiler. I tried compiling on MSVC second statement give...
1
by: Juergen Marsch | last post by:
Hi, writing files > 2G with standard library iostream classes results in "... file size limit exeeded." Compiling my program with "-D_FILE_OFFSET_BITS=64" doesn't make any difference. If you...
9
by: ai | last post by:
Hi , I have an application which has to read files of size few mba nd read them into array . Since i am using STL and std namespace to avoid the error error C2872: 'ifstream' : ambiguous...
4
by: aurgathor | last post by:
Howdy, What would be the equivalent of getch() using iostream? My current code is: cout << "\nPress <Enter> to continue..."; getch(); but <conio.h> is not kosher for the C++ class.
2
by: Brett | last post by:
Hi, I'm compiling an old project under the 'new' visual studio 7.1.3088. I changed the line: #include <iostream.h> to #include <iostream> and now I get a stack of errors, some of which...
9
by: nichas | last post by:
I tried to use #include<iostream> in visual C++ compiler but then it didnt work but i see this is the way it is being mentioned in C++ primer by lippman and lajoie.. where is the problem.. Do...
5
by: wesley | last post by:
Hi All. i am new to C++. I know that in order to use cout, i need to include <iostream>. I have done this, but i still get errors when i try to output to the screen. Is there a file that needs to...
1
by: lars.uffmann | last post by:
Hello everyone! I just debugged a pretty huge project, eliminating basically every memory leak that would occur with the current configuration files, at least according to the mtrace() tool from...
11
by: gumboots | last post by:
Hi there guys, I've recently purchased "Sam's Teach Yourself C++ Fifth Edition" (About a week before the 6th edition came out) I'm trying to work through the book, but in trying to compile Hello...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.