Topic: Tis an easy mistake to find...I swear. :)  (Read 4270 times)

0 Members and 1 Guest are viewing this topic.

Toasty0

  • Guest
Tis an easy mistake to find...I swear. :)
« Reply #20 on: January 05, 2004, 09:57:18 pm »

#include < windows.h >
#include "sysmets.h"

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPRAM);

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPreInstance, PSTR szCmdLine, int iCmdLine)

{
   static TCHAR szAppName[]=TEXT9"SysMets1");
   HWND hwnd;
   MSG msg;
   WNDCLASS wndclass;

   wndclass.style      =CS_HREDRAW | CS_VREDRAW;
   wndclass.lpfnWndProc=WndProc;
   wndclass.cbClsExtra   =0;
   wndclass.cbWndExtra   =0;


Within that code there is a mistake. Anyone care to call it. Yes, the code is incompletre, but that isn't the error.

Best,
Jerry      

Sirgod

  • Guest
Re: Tis an easy mistake to find...I swear. :)
« Reply #21 on: January 05, 2004, 10:00:19 pm »
Quote:


#include < windows.h >
#include "sysmets.h"

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPRAM);

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPreInstance, PSTR szCmdLine, int iCmdLine)

{
   static TCHAR szAppName[]=TEXT9"SysMets1");
   HWND hwnd;
   MSG msg;
   WNDCLASS wndclass;

   wndclass.style      =CS_HREDRAW | CS_VREDRAW;
   wndclass.lpfnWndProc=WndProc;
   wndclass.cbClsExtra   =0;
   wndclass.cbWndExtra   =0;


Within that code there is a mistake. Anyone care to call it. Yes, the code is incompletre, but that isn't the error.

Best,
Jerry      




Is It the lack of a } at the End?

stephen

Toasty0

  • Guest
Re: Tis an easy mistake to find...I swear. :)
« Reply #22 on: January 05, 2004, 10:01:51 pm »
nope...the snippet is incomplete so there would be no closing brackett. But good catch had it been a complete source file.

Best,
Jerry  

Sirgod

  • Guest
Re: Tis an easy mistake to find...I swear. :)
« Reply #23 on: January 05, 2004, 10:26:20 pm »
Ahh Darn, <slaps head with a pinata stick>

hehe, oh well, I'll wait and see what It is. unless It's using the wrong case "L" or "i"

stephen

NCC2012

  • Guest
Re: Tis an easy mistake to find...I swear. :)
« Reply #24 on: January 05, 2004, 10:39:55 pm »
static TCHAR szAppName[]=TEXT9"SysMets1");

Does there need to be a ( since there's a ); at the end?

Just a wild guess.  

Toasty0

  • Guest
Re: Tis an easy mistake to find...I swear. :)
« Reply #25 on: January 05, 2004, 11:29:36 pm »
Quote:

static TCHAR szAppName[]=TEXT9"SysMets1");

Does there need to be a ( since there's a ); at the end?

Just a wild guess.  




Close.

that line should read:

static TCHAR szAppName[]=TEXT("SysMets1");

Nice catch.

Best,
Jerry
 

Aldaron

  • Guest
Re: Tis an easy mistake to find...I swear. :)
« Reply #26 on: January 06, 2004, 08:50:51 am »
  int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPreInstance, PSTR szCmdLine, int iCmdLine)

missing a semi-colon at the end?

Strafer

  • Guest
Re: Tis an easy mistake to find...I swear. :)
« Reply #27 on: January 06, 2004, 02:35:19 pm »
Quote:

  int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPreInstance, PSTR szCmdLine, int iCmdLine)

missing a semi-colon at the end?  



No, that's what the { below is for.
Had it been a declaration only, and not a definition, then yes the missing ; would be a catch.

Speaker to Aliens

  • Guest
Re: Tis an easy mistake to find...I swear. :)
« Reply #28 on: January 07, 2004, 12:30:25 am »
Quote:


#include < windows.h >
#include "sysmets.h"

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPRAM);

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPreInstance, PSTR szCmdLine, int iCmdLine)

{
   static TCHAR szAppName[]=TEXT9"SysMets1");
   HWND hwnd;
   MSG msg;
   WNDCLASS wndclass;

   wndclass.style      =CS_HREDRAW | CS_VREDRAW;
   wndclass.lpfnWndProc=WndProc;
   wndclass.cbClsExtra   =0;
   wndclass.cbWndExtra   =0;


Within that code there is a mistake. Anyone care to call it. Yes, the code is incompletre, but that isn't the error.

Best,
Jerry      



Got it. Of course. It was easy. You've used C++ (or some bastard variant).  Always a big mistake that.

Toasty0

  • Guest
Re: Tis an easy mistake to find...I swear. :)
« Reply #29 on: January 07, 2004, 01:25:19 am »
Quote:

Quote:


#include < windows.h >
#include "sysmets.h"

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPRAM);

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPreInstance, PSTR szCmdLine, int iCmdLine)

{
   static TCHAR szAppName[]=TEXT9"SysMets1");
   HWND hwnd;
   MSG msg;
   WNDCLASS wndclass;

   wndclass.style      =CS_HREDRAW | CS_VREDRAW;
   wndclass.lpfnWndProc=WndProc;
   wndclass.cbClsExtra   =0;
   wndclass.cbWndExtra   =0;


Within that code there is a mistake. Anyone care to call it. Yes, the code is incompletre, but that isn't the error.

Best,
Jerry      



Got it. Of course. It was easy. You've used C++ (or some bastard variant).  Always a big mistake that.  




Golly, I hope you didn't want it in C or Pacal.