Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-03-2007, 07:47 PM   #1
Registered: Nov 2005
Location: MN, US
Distribution: openSuse 10.2
Posts: 93

Rep: Reputation: 15
Need Help Converting C# Code to C++

I found how to do something in C#, but can't find C++ equivelents. All converters are for C++ to C#, not vice verca. Here:
            FileStream fs = new FileStream((map.path, 
                 FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite); 
             BinaryReader br = new BinaryReader(fs); 
             BinaryWriter bw = new BinaryWriter(fs); 
             int sig = 0; 
             long length = br.BaseStream.Length; 
             br.BaseStream.Position = 2048; 
             for (long i = 2048; i < length; i += 4) 
                 sig ^= br.ReadInt32(); 
             bw.BaseStream.Position = 720; 
Old 04-03-2007, 08:40 PM   #2
Senior Member
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
check this link:
scroll down to Binary Files

seems like what you may be looking for


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting Windows DLL code to Linux shared library DavidW567 Programming 7 07-27-2010 09:15 AM
small syntax problem with C code (implemented in Code Composer Studio) illiniguy3043 Programming 6 01-07-2008 03:14 AM
User Preferences: Use HTML code instead of vB code? (vB code is overrated) stefanlasiewski LQ Suggestions & Feedback 5 07-26-2005 02:37 AM
converting vb6 code to python mrobertson Programming 2 06-02-2005 02:27 PM
Converting bash command to C code Linh Programming 3 06-13-2003 11:39 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:47 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration