.NET more like .WTF

Started by
12 comments, last by Muncher 19 years, 10 months ago
Ok i started playing with .NET the other day, using C++. So i tried to make a simple console application that prints to the screen... yep fine... When it comes to i/o however... how the hell do you open a file in this bs piece of software? the old libraries don''t seem to work at all!?
Advertisement
Put all of your includes in stdafx.h

Also, put #include <iostream> without the .h at the end.

.NET is the politically correct C++ so you also gotta use the
using namespace std; on top as well
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                                          
Looking for video game music? Check out some of my samples at http://www.youtube.c...ser/cminortunes            
                                                          
I'm currently looking to create music for a project, if you are interested e-mail me at cminortunes@gmail.com    
                                                          
Please only message me for hobby projects, I am not looking to create music for anything serious.
Using the std namespace has nothing to do with .NET, it's because everything in iostream is declared in that namespace As well as everything else in the standard headers.

Using managed extensions means using the .NET Framework. There's nothing wrong with .NET, you just have to get used with that's happening first And explore the framework a bit. I think you'll find everything you need in the File and FileStream classes. And more!



[edited by - Zipster on May 28, 2004 1:40:54 AM]
god... i just want to use the old file io functions.....
Or you can use the stabdard version of c++.
______________________________________________________________________________________With the flesh of a cow.
Stabdard C++. All this time I''ve been using standard C++. No wonder! lol =p
Old habits die hard, except in this case they were wrong to begin with.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
1) This thread should be closed immediately before it turns into a flamebait due to the topic title.

2) Topic titles should be descriptive of the questions you have.

edit: nevermind on #3

4) Check msdn.microsoft.com. It's a wonderful wealth of information, as long as you know how to use a search feature. There's also the help files that come with VS.NET which are actually useful. I'm not going to look this up, as I would rather teach you how to fish in the great sea of search engines, thus "feeding you for a lifetime", rather than giving you a fish and "feeding you for a day".

5) remove "hell" "bs" and "!?"... by doing this early, you have a better chance of attracting venture capitalists with your superior writing skills.

6) remove "god" and "I just want". The first will get someone started on the pledge of allegience controvercy, and the second sounds whiny. Replace with "dang" and "I prefer" prehaps. Again, venture capitalists. They're crazy about this kind of thing.

[edited by - MaulingMonkey on May 28, 2004 7:05:11 AM]
ok....

Well, I assume you use Visual Studio.NET, and not Managed C++. You are suppose to use the ANSI C++, thus for the STL libraries such as cout, cin, you need to use iostream, instead of iostream.h. As for standard file I/O, do you mean C++ style(fstream) or C style(FILE *). fstream classes can be found in .

Toolmaker


My site
/* -Earth is 98% full. Please delete anybody you can.*/

quote:Original post by Muncher
god... i just want to use the old file io functions.....


#include <cstdio>using namespace std;


[edited by - MDI on May 28, 2004 3:02:56 PM]

This topic is closed to new replies.

Advertisement