LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 03-25-2001, 07:40 AM   #1
Gaz
LQ Newbie
 
Registered: Mar 2001
Posts: 1

Rep: Reputation: 0
Question


Hi,
I've been having some problems writing files using C++ in Linux(g++ compiler).

I'm trying to write a program in both Windows and Linux to write some data to a file and prevent it from being shared whilst this is happening. In Windows i've been using the following,

fThirdFile.open("file3.txt",ios::out,filebuf::no_share);

When i compile this in Linux i get a parse error after filebuf. Is there a way to deny sharing in C++?
If i was doing this in C i would use flock() but it takes a filedescriptor not a object. I need to write this in C++.

Thanks,
Gaz
 
  


Reply


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
sharing files arell12 Linux - Newbie 1 08-03-2005 06:36 PM
Sharing Files landuchi Linux - General 4 06-23-2005 03:56 AM
mandrake 10.1 sharing files and internet sharing xfiles_arram Linux - Networking 0 05-21-2005 02:22 PM
Sharing files with others Cooner Programming 1 09-23-2004 04:28 PM
sharing files ridha Linux - Networking 1 02-01-2003 10:18 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:59 AM.

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