Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2007

Tip: Looking for answers? Try searching our database.

Read Write to file or console

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Allen Maki - 21 Jul 2007 00:15 GMT
How come line 1 will output garbage to the screen, but line 2 will output a good number to a file?

How can I make line 1 out put a good number to the screen



                           



String* dayStr = System::DateTime::Now.ToString("dd");            

Int32 dayInt = System::Int32::Parse(dayStr);  

Console::WriteLine("the day is {0}", __box(dayInt) );     // Line 1

                                     

                                     .

                                       .        

                                       .





String* path = new String("_1D.txt");  // will read the time from a file

FileStream * fs = new FileStream(path, FileMode::Open);

BinaryReade* br = new BinaryReader(fs);

Int32 day    = br->ReadInt32();



fs = new FileStream(S"_1k.txt", FileMode::Create); //will write the time to another file

BinaryWriter* bw = new BinaryWriter(fs);                                                                                      

Br->Write( day);                                                          //Line  2











           



         


Göran Andersson - 21 Jul 2007 20:42 GMT
Don't post the same question in multiple groups. Do a proper cross
posting instead, so that all replies appear in all the groups.

Signature

Göran Andersson
_____
http://www.guffa.com

Allen Maki - 22 Jul 2007 01:54 GMT
Can some one tell me what does "Do a proper cross" mean?

> posting instead
> Don't post the same question in multiple groups. Do a proper cross posting
> instead, so that all replies appear in all the groups.
Göran Andersson - 22 Jul 2007 10:57 GMT
> Can some one tell me what does "Do a proper cross" mean?

A cross posting is when you create several threads in different group by
posting a single message into those groups.

http://en.wikipedia.org/wiki/Crossposting

Signature

Göran Andersson
_____
http://www.guffa.com


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.