Click here to Skip to main content
15,883,709 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionStructured Exception Handling - Win32 Style Pin
Richard Andrew x6426-Jan-06 22:13
professionalRichard Andrew x6426-Jan-06 22:13 
AnswerRe: Structured Exception Handling - Win32 Style Pin
David Crow27-Jan-06 3:17
David Crow27-Jan-06 3:17 
QuestionHaving problem with an SDI menu Pin
Learner200626-Jan-06 19:13
Learner200626-Jan-06 19:13 
AnswerRe: Having problem with an SDI menu Pin
Owner drawn26-Jan-06 19:29
Owner drawn26-Jan-06 19:29 
Questionadjust margins of printing page Pin
includeh1026-Jan-06 18:52
includeh1026-Jan-06 18:52 
AnswerRe: adjust margins of printing page Pin
Owner drawn26-Jan-06 19:35
Owner drawn26-Jan-06 19:35 
GeneralRe: adjust margins of printing page Pin
includeh1026-Jan-06 19:55
includeh1026-Jan-06 19:55 
QuestionWhy the hell won't this function work? Pin
Lord Kixdemp26-Jan-06 15:43
Lord Kixdemp26-Jan-06 15:43 
Hello everyone! Big Grin | :-D

OK, here's some previous declarations/definitions:

<br />
// Text representations of map files<br />
	char ** mapLayers;<br />
<br />
// Width & Height of screen<br />
#define WIDTH	512<br />
#define HEIGHT	384<br />


Now, look at my func:

void Mazzee::GetMapInfo(std::string map)<br />
{<br />
	// Set sizes<br />
	this->mapLayers = (char**)new char[3][(WIDTH/32)*(HEIGHT/32)];<br />
<br />
	// Temporary file stream<br />
	FILE * f[3] = {fopen((map + ".ml1").c_str(), "rb"), fopen((map + ".ml2").c_str(), "rb"), fopen((map + ".ml3").c_str(), "rb")};<br />
<br />
	int p;<br />
	while (p < (WIDTH/32)*(HEIGHT/32))<br />
	{<br />
		for (int x = 0; x < 3; x++)<br />
		{<br />
			p = 0;<br />
<br />
			// Exit if EOF was found<br />
			if (feof(f[x]))<br />
				return;<br />
<br />
			int v = fgetc(f[x]);<br />
			if (v > 32)<br />
			{<br />
				this->mapLayers[x][p] = v;<br />
				++p;<br />
			}<br />
		}<br />
	}<br />
}


Why won't it work?! Mad | :mad: Thanks! Wink | ;-)

Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
AnswerRe: Why the hell won't this function work? Pin
Stephen Hewitt26-Jan-06 16:06
Stephen Hewitt26-Jan-06 16:06 
AnswerRe: Why the hell won't this function work? Pin
Christian Graus26-Jan-06 16:18
protectorChristian Graus26-Jan-06 16:18 
GeneralRe: Why the hell won't this function work? Pin
Stephen Hewitt26-Jan-06 16:25
Stephen Hewitt26-Jan-06 16:25 
AnswerRe: Why the hell won't this function work? Pin
Stephen Hewitt26-Jan-06 16:37
Stephen Hewitt26-Jan-06 16:37 
AnswerRe: Why the hell won't this function work? Pin
David Crow27-Jan-06 3:21
David Crow27-Jan-06 3:21 
GeneralRe: Why the hell won't this function work? Pin
Lord Kixdemp27-Jan-06 11:12
Lord Kixdemp27-Jan-06 11:12 
GeneralRe: Why the hell won't this function work? Pin
Lord Kixdemp27-Jan-06 13:20
Lord Kixdemp27-Jan-06 13:20 
QuestionHow to get screen size in millimeters or inches? Pin
includeh1026-Jan-06 15:22
includeh1026-Jan-06 15:22 
AnswerRe: How to get screen size in millimeters or inches? Pin
Stephen Hewitt26-Jan-06 15:28
Stephen Hewitt26-Jan-06 15:28 
GeneralRe: How to get screen size in millimeters or inches? Pin
includeh1026-Jan-06 16:04
includeh1026-Jan-06 16:04 
GeneralRe: How to get screen size in millimeters or inches? Pin
Stephen Hewitt26-Jan-06 16:26
Stephen Hewitt26-Jan-06 16:26 
GeneralRe: How to get screen size in millimeters or inches? Pin
includeh1026-Jan-06 17:08
includeh1026-Jan-06 17:08 
GeneralRe: How to get screen size in millimeters or inches? Pin
Stephen Hewitt26-Jan-06 17:46
Stephen Hewitt26-Jan-06 17:46 
GeneralRe: How to get screen size in millimeters or inches? Pin
includeh1026-Jan-06 18:54
includeh1026-Jan-06 18:54 
QuestionRe: How to get screen size in millimeters or inches? Pin
David Crow27-Jan-06 3:34
David Crow27-Jan-06 3:34 
AnswerRe: How to get screen size in millimeters or inches? Pin
includeh1027-Jan-06 14:59
includeh1027-Jan-06 14:59 
QuestionWM_NCPAINT minimize/restore Pin
picazo26-Jan-06 13:00
picazo26-Jan-06 13: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.