Click here to Skip to main content
14,697,750 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
QuestionUnable to paste clipboard data by sending WM_PASTE message Pin
lazy_panther3-Feb-10 2:30
Memberlazy_panther3-Feb-10 2:30 
AnswerRe: Unable to paste clipboard data by sending WM_PASTE message Pin
Iain Clarke, Warrior Programmer3-Feb-10 4:45
MemberIain Clarke, Warrior Programmer3-Feb-10 4:45 
AnswerRe: Unable to paste clipboard data by sending WM_PASTE message Pin
LunaticFringe3-Feb-10 4:48
MemberLunaticFringe3-Feb-10 4:48 
QuestionRe: Unable to paste clipboard data by sending WM_PASTE message [modified] Pin
lazy_panther3-Feb-10 17:35
Memberlazy_panther3-Feb-10 17:35 
AnswerRe: Unable to paste clipboard data by sending WM_PASTE message Pin
LunaticFringe3-Feb-10 19:44
MemberLunaticFringe3-Feb-10 19:44 
GeneralRe: Unable to paste clipboard data by sending WM_PASTE message Pin
lazy_panther4-Feb-10 2:50
Memberlazy_panther4-Feb-10 2:50 
GeneralRe: Unable to paste clipboard data by sending WM_PASTE message Pin
LunaticFringe4-Feb-10 14:32
MemberLunaticFringe4-Feb-10 14:32 
QuestionTroublesome Handling of Files in C++ Pin
Sujan Dhakal3-Feb-10 2:29
MemberSujan Dhakal3-Feb-10 2:29 
#include <iostream><br />
#include <fstream><br />
using namespace std;<br />
<br />
int main() {<br />
<br />
	char data[5];//={'a','b','c','f','\0'};<br />
	//fstream file("c:\\test.txt",ios::out | ios::binary);<br />
	fstream file("c:\\test.txt",ios::in | ios::binary);<br />
	if(file.is_open())<br />
	{<br />
		//file.write(data,sizeof(data));<br />
		while(!file.eof())<br />
		{<br />
		file.read(data,sizeof(data));<br />
		cout<<data;<br />
		}<br />
		file.close();<br />
	}<br />
	else<br />
	{<br />
		cout<<"Error";<br />
	}<br />
<br />
	return 0;<br />
}


I've written "abcf" to text.txt file in binary mode. i'm reading back the data into the variable "data". why the heck the output is "abcfabcf". I should be "abcf" but what happened to this one. and another question do anybody knows how to write and read string data-type in binary mode. please help.
AnswerRe: Troublesome Handling of Files in C++ Pin
CPallini3-Feb-10 2:37
mveCPallini3-Feb-10 2:37 
AnswerRe: Troublesome Handling of Files in C++ [modified] Pin
Stuart Dootson3-Feb-10 2:46
professionalStuart Dootson3-Feb-10 2:46 
GeneralRe: Troublesome Handling of Files in C++ Pin
CPallini3-Feb-10 2:54
mveCPallini3-Feb-10 2:54 
GeneralRe: Troublesome Handling of Files in C++ Pin
Stuart Dootson3-Feb-10 3:28
professionalStuart Dootson3-Feb-10 3:28 
AnswerRe: Troublesome Handling of Files in C++ Pin
Raj Indian3-Feb-10 23:00
MemberRaj Indian3-Feb-10 23:00 
QuestionSetUpAndDeployment Project Pin
jannathali2-Feb-10 23:31
Memberjannathali2-Feb-10 23:31 
AnswerRe: SetUpAndDeployment Project [modified] Pin
KingsGambit3-Feb-10 0:47
MemberKingsGambit3-Feb-10 0:47 
GeneralRe: SetUpAndDeployment Project Pin
jannathali3-Feb-10 2:03
Memberjannathali3-Feb-10 2:03 
GeneralRe: SetUpAndDeployment Project Pin
KingsGambit3-Feb-10 2:14
MemberKingsGambit3-Feb-10 2:14 
QuestionCaption Change Pin
john56322-Feb-10 21:32
Memberjohn56322-Feb-10 21:32 
AnswerRe: Caption Change Pin
Richard MacCutchan2-Feb-10 23:34
mveRichard MacCutchan2-Feb-10 23:34 
AnswerRe: Caption Change Pin
CPallini2-Feb-10 23:42
mveCPallini2-Feb-10 23:42 
AnswerRe: Caption Change Pin
Moak3-Feb-10 2:12
MemberMoak3-Feb-10 2:12 
QuestionHow to disable LNK4099 warning in debug build Pin
Chesnokov Yuriy2-Feb-10 21:19
professionalChesnokov Yuriy2-Feb-10 21:19 
AnswerRe: How to disable LNK4099 warning in debug build Pin
«_Superman_»2-Feb-10 21:46
professional«_Superman_»2-Feb-10 21:46 
QuestionRe: How to disable LNK4099 warning in debug build Pin
Chesnokov Yuriy2-Feb-10 22:20
professionalChesnokov Yuriy2-Feb-10 22:20 
AnswerRe: How to disable LNK4099 warning in debug build Pin
Dr. Frank Heimes7-Feb-11 23:00
MemberDr. Frank Heimes7-Feb-11 23:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.