Προς το περιεχόμενο

Erotisi stin VC 6


Dvs

Προτεινόμενες αναρτήσεις

Δημοσ.

void CKeyBoard_Events_4Dlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)

{

// TODO: Add your message handler code here and/or call default

<p> char lsChar;

HCURSOR lhCursor;

 

lsChar = char(nChar);

if (lsChar == 'a');

{ MessageBox ("KEY A PRESSED","Character pressed!"); }<p> if (lsChar == 'B');

{ MessageBox ("KEY B PRESSED","Character pressed!"); }<p>

CDialog::OnKeyDown(nChar, nRepCnt, nFlags);<p>}<p>to provlima einai to exis: oti xaraktira kai na patiso mou vgazei kai ta 2 messageboxes!! Ti kano lathos ?<p>[ 04-02-2002: Το μήνυμα επεξεργάστηκε από: Dvs ]<p>[ 04-02-2002: Το μήνυμα επεξεργάστηκε από: Dvs ]</p>

Δημοσ.

Sta parakatw:

if (lsChar == 'a');

if (lsChar == 'B');

den xreiazetai to erwthmatiko pou exoun sto telos.<p>einai san na tou les, an h metablhth einai ish me a h B tote mhn kaneis tpt. Opote meta blepei to block tou kwdika me ta MessageBoxes kai ta ektelei smile.gif" border="0

Δημοσ.

Ligo para3eno mou akougetai ayto pou les. Mexri stigmhs 4 IDE exw xrhsimopoihsei (Borland C++, Microsoft Visual C++, Rhide (DJGPP) kai Bloodshed C++) kai to ka8e ena exei ena 3exwristo para8yro sto opoio sou emfanizei ta la8h pou exei to programma sou. Esy poio xrhsimopoieis? Isws exei kapoia epilogh to programma na sou emfanizei ayto to para8yro kai aplws den to exeis epile3ei. Pantws kai compile apo command-line ama kaneis 8a sou dei3ei pou briskontai ta la8h.

Δημοσ.

elpizo, giati diaforetika tha faei uninstall. den antexo na gpsaxno grammi rammi ta lathi. einai poli kourastiko. Exo to Microsoft Visual C++. pia mpara ergaleion prepei na emfaniso?<p>Episis, iparxei tipota pou na morfopoiei automata tis entoles? (den einai dinaton na mou xtipaei error epeidi egrapsa "If" kai oxi "if"!)

Δημοσ.

pragmati. smile.gif" border="0 <p>re paidia iparxei kanas tropos na mou deixnei pou entopizei ta syntax errors otan patao compile?

(den mou ta deixnei kai anagazomai na psaxon grammi-grammi me "//" :> )

Δημοσ.

Gia to poia epilogh prepei na tsekareis den mporw na sou pw giati twra den thn exw egkatesthmenh thn vc++. Ama einai 8a thn xwsw kai 8a s pw (an kai nomizw apo default emena to edeixne).<p>O monos tropos gia na to petyxeis ayto me thn if einai na kaneis ena arxeio p.x. defs.h kai ekei mesa na exeis merika #defines opws

#define If if

#define IF if

#define iF if<p>dld opou briskei thn le3h if (olous tous syndyasmous) na thn antika8istei me to lowercase if. Aplws sthn arxh ka8e programmatos sou 8a prepei na kaneis include to arxeio ayto me ta #defines.<p>paradeigma<p>#include <iostream.h>

#include "defs.h" // Periexei ta #defines<p>int main()

{

bool oops = false;<p> If (oops)

cout << "Den prokeitai na emfanistw" << endl;

else

cout << "Holy cow!" << endl; <p> return 0;

}<p>Elpizw na boh8hsan smile.gif" border="0

Δημοσ.

#define If if

#define IF if

#define iF if<p>kai omois gia oles tis alles entoleS (px. false/true/null... ). xoxo smile.gif" border="0 <p>thx

epsaxa ta options alla den leei tipota! tha xanapsakso omos

Αρχειοθετημένο

Αυτό το θέμα έχει αρχειοθετηθεί και είναι κλειστό για περαιτέρω απαντήσεις.

  • Δημιουργία νέου...