Click here to Skip to main content
15,914,481 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Thread function parameter Pin
Nishad S8-Aug-07 18:45
Nishad S8-Aug-07 18:45 
QuestionSetting multile line text in a document Pin
koumodaki8-Aug-07 10:23
koumodaki8-Aug-07 10:23 
AnswerRe: Setting multile line text in a document Pin
Reagan Conservative8-Aug-07 11:18
Reagan Conservative8-Aug-07 11:18 
AnswerRe: Setting multile line text in a document Pin
fefe.wyx8-Aug-07 14:58
fefe.wyx8-Aug-07 14:58 
QuestionWhy my MDI application closes when I close a dialog box inside? Pin
saravana0018-Aug-07 7:51
saravana0018-Aug-07 7:51 
AnswerRe: Why my MDI application closes when I close a dialog box inside? Pin
Russell'8-Aug-07 8:10
Russell'8-Aug-07 8:10 
AnswerRe: Why my MDI application closes when I close a dialog box inside? Pin
jk chan8-Aug-07 17:41
jk chan8-Aug-07 17:41 
QuestionHelp With Arrays Pin
simoncoul8-Aug-07 7:46
simoncoul8-Aug-07 7:46 
Hi I'm trying to write a function that will return an array this is what I have

unsigned char sendbuf[6];
sendbuf[0] = myclass::makesendbuffer(SendPacket);	

unsigned char myclase::makesendbuffer(Packet SendPacket){
	unsigned char sendbuf2[6];
	
	if(SendPacket.data < 0){
		SendPacket.data += 65536;
	}
	sendbuf2[0] = SendPacket.data % 256;
	sendbuf2[1] = floor(double(SendPacket.data/256));	
	sendbuf2[2] = SendPacket.address % 256;
	sendbuf2[3] = floor(double(SendPacket.address/256));
	sendbuf2[4] = SendPacket.command;

	return *sendbuf2;
}


The return is just giving me the value of the first element and everything else is not used. Any ideas of what I'm doing wrong here would be great thanks!

Simon
AnswerRe: Help With Arrays [modified] Pin
Russell'8-Aug-07 7:59
Russell'8-Aug-07 7:59 
GeneralRe: Help With Arrays Pin
simoncoul8-Aug-07 8:16
simoncoul8-Aug-07 8:16 
GeneralRe: Help With Arrays Pin
jhwurmbach8-Aug-07 8:28
jhwurmbach8-Aug-07 8:28 
GeneralRe: Help With Arrays Pin
simoncoul8-Aug-07 8:33
simoncoul8-Aug-07 8:33 
GeneralRe: Help With Arrays Pin
jhwurmbach8-Aug-07 8:35
jhwurmbach8-Aug-07 8:35 
GeneralRe: Help With Arrays Pin
Mark Salsbery8-Aug-07 8:36
Mark Salsbery8-Aug-07 8:36 
GeneralRe: Help With Arrays Pin
David Crow8-Aug-07 8:30
David Crow8-Aug-07 8:30 
GeneralRe: Help With Arrays Pin
simoncoul8-Aug-07 8:36
simoncoul8-Aug-07 8:36 
GeneralRe: Help With Arrays Pin
David Crow8-Aug-07 8:41
David Crow8-Aug-07 8:41 
GeneralRe: Help With Arrays Pin
simoncoul8-Aug-07 8:45
simoncoul8-Aug-07 8:45 
GeneralRe: Help With Arrays Pin
Russell'8-Aug-07 8:46
Russell'8-Aug-07 8:46 
GeneralRe: Help With Arrays Pin
simoncoul8-Aug-07 8:55
simoncoul8-Aug-07 8:55 
AnswerRe: Help With Arrays Pin
jhwurmbach8-Aug-07 8:16
jhwurmbach8-Aug-07 8:16 
QuestionGetting a document pointer in a class other than View? Pin
cwbenson8-Aug-07 7:00
cwbenson8-Aug-07 7:00 
QuestionRe: Getting a document pointer in a class other than View? Pin
David Crow8-Aug-07 7:02
David Crow8-Aug-07 7:02 
AnswerRe: Getting a document pointer in a class other than View? Pin
jhwurmbach8-Aug-07 8:22
jhwurmbach8-Aug-07 8:22 
AnswerRe: Getting a document pointer in a class other than View? Pin
Nelek9-Aug-07 2:14
protectorNelek9-Aug-07 2:14 

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.