I am learning how to program through the windows.h library and was following a tutorial. After I copied the code to just create a window I got a lot of errors here is the code [code=c] #include <windows.h> #define WNDCLASSNAME "wndclass" //the needed global variables using namespace std; HWND handleWin; HDC hdc; bool quit = FALSE; //the main function WINAPI WinMain (HINSTANCE hinstance, HINSTANCE hprevinstance, LPSTR lpcmdline, int nshowcmd) { //set up the window class MSG msg; WINCLASSEX ex; ex.cbSize = sizeof(WNDCLASSEX); ex.style = CS_HREDRAW|CS_VREDRAW|CS_OWNDC; ex.lpfnWinProc = WinProc; ex.cbClsExtra = 0; ex.cbWndExtra = 0; ex.hInstance = hinstance; ex.hIcon = LoadIcon(NULL, …

Member Avatar
Member Avatar
+0 forum 3

[CODE]import Tkinter class converter(Tkinter.Tk): def __init__(self,parent): Tkinter.Tk.__init__(self,parent) self.parent = parent self.initialize() def initialize(self): self.grid() self.labelVariable = Tkinter.IntVar() welcome = Tkinter.Label(self, textvariable=self.labelVariable, anchor="w", fg="black", bg="lightgrey") welcome.grid(column=0, row=0, columnspan=3, sticky='EW') self.labelVariable.set(u"Hello there. Welcome to MAKK's currency converter.") self.entryVariable = Tkinter.StringVar() self.entry = Tkinter.Entry(self,textvariable=self.entryVariable) self.entry.grid(column=0, row=1, sticky='EW') self.entry.bind("<Return>", self.OnPressEnter) self.entryVariable.set(u"Enter currency here.") money = self.entryVariable.set toUSD = Tkinter.Button(self, text=u"Convert to USD", command=self.ConvertToUSD) toUSD.grid(column=1, row=1) toCAD = Tkinter.Button(self, text=u"Convert to CAD", command=self.ConvertToCAD) toCAD.grid(column=2, row=1) self.labelVariable = Tkinter.StringVar() output = Tkinter.Label(self, textvariable=self.labelVariable, anchor="w", fg="black", bg="lightgrey") output.grid(column=0, row=3, columnspan=3, sticky='EW') self.labelVariable.set(u"Hello !") self.grid_columnconfigure(0,weight=1) self.resizable(False,False) self.update() self.geometry(self.geometry()) self.entry.focus_set() self.entry.selection_range(0, Tkinter.END) def ConvertToUSD(self): self.labelVariable.set(self.entryVariable.get()+ "You clicked the button …

Member Avatar
Member Avatar
+0 forum 2

Hi, My colleague and I have a strange issue where certain sites give us a "DNS error - cannot find server" error. We share an office with a friend and his PC, connected to the same router is able to view all these options without any issues whatsoever. I ping the sites and they dont exist. Some sites were visible and arent now. Its the same with Firefox, IE7 and Chrome. I have quite a few firefox plugins including Xmarks as well as Dropbox installed. I did have Kaspersky 2009 installed but someone told me to uninstall it to fix …

Member Avatar
Member Avatar
+0 forum 5

[CODE]#include <iostream> #include <string> using namespace std; struct Employee { //Data string name; int id; string residance; int salary; }; class Node { public: // Data Employee data; // The Next Pointer Node * next; // Constructor Node(Employee Object ,Node * ptr = NULL ); }; class List { int size; Node * first; //Node Obj; Node * ptr; int counter; public: bool Exist; public: List(); /************************************ PreCondition : None PostCondition : Linked List is constructed , with head and tail pointing to nothing and a size if zero ************************************/ //Copy Constructor List(List& ); /************************************ PreCondition : None PostCondition : …

Member Avatar
Member Avatar
+0 forum 3

I cant figure out why this message is popping up. This is a program that is calculates if it is a leap year. [CODE]#include <iostream> using namespace std; int main() { double year, mod4, mod100, mod400; bool leapYear; cout << "Enter a year from 1582 on.\n"; cin >> year; /* 0=False 1=True */ mod4 = year%4; mod100 = year%100; mod400 = year%400; /* If year is divisible by 4 check to see if it is divisible by 100. If divisible by 100 check to see if it is divisible by 400. If not it is not a leap year. */ …

Member Avatar
Member Avatar
+0 forum 5

Hi there. Im pretty new to PHP and have made a terrible mistake, Im getting this message Parse error: syntax error, unexpected T_STRING ......functions.php on line 2 the site workd fine but failed once Ive tried to add a sidebar, Ive tried to replace the function.php code Ive just eddited with the original one i got from the theme file, and got that message at the moment I have no access to my site at all, I only get the above message and am copletly lost. heres the functions.php file currently used: <?php $artThemeSettings = array( 'menu.showSubmenus' => true, 'menu.homeCaption' …

Member Avatar
Member Avatar
+0 forum 2

Hi, I am creating a crackme (or possibly keygenme, if i feel like it) that realys on a IsDebuggerPresent call to see if the user has olly or another debugger open analyzing it. My current code reads as follows: [CODE]#include <windows.h> #include <stdio.h> #include <iostream> #include <ctime> using namespace std; void debuggerPresent() { SYSTEMTIME st, lt; GetSystemTime(&st); GetLocalTime(&lt); cout << "Application error or Debugger Present!!!" << endl; return; } void noDebug(int mode){ SYSTEMTIME st, lt; GetSystemTime(&st); GetLocalTime(&lt); if(mode = st.wMonth) { //Do the main username/password thing here.... } else { debuggerPresent(); } return; } int main() { BOOL WINAPI IsDebuggerPresent(void); …

Member Avatar
+0 forum 0

Pls help me out i am using visual C++6.0 enterprise edition.... [code=c++] /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ // Source file originally created by PegWindowBuilder // // // Class Name: ecgclass // // Notes: /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* WB Auto-Generated Start (1) */ #include "peg.hpp" #include "ecg_res.hpp" #include "ecgone.hpp" extern PegResourceTable Default_Theme_ResourceTable; /* WB Auto-Generated End (2) */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* WB Auto-Generated Start (3) */ void PegAppInitialize(PegPresentationManager *pPresent) { /* WB Auto-Generated End (20) */ /* WB Auto-Generated Start (21) */ PegResourceManager::InstallResourcesFromTable(&Default_Theme_ResourceTable); ecgclass *pWin = new ecgclass(0,0); ecgclass ; pPresent->Center(pWin); pPresent->Add(pWin); /* WB Auto-Generated End (4) */ } /* WB Auto-Generated Start (5) */ …

Member Avatar
Member Avatar
+0 forum 6

I'm newish to c++ and even newer to ubuntu I tried linking and this is what I got: g++ -o calculator *.o -lcrypt -lm main.o: In function `main': main.cpp: (.text+0x1ea): undefined reference to `SAMSErrorHandling::Initialize()' main.cpp: (.text+0x2fa): undefined reference to `SAMSErrorHandling::HandleNotANumberError()' main.cpp: (.text+0x322): undefined reference to `SAMSPrompt::UserWantsToContinueYOrN(char const*)' collect2: ld returned 1 exit status let it be noted I've never linked anything using command line Dev-C++ used to magically do all that stuff for me. Not sure what the problem is... Someone reccomended I put "using namespace SAMSErrorHandling" in main.cpp but the error message remains the same everything compiles fine, it's …

Member Avatar
Member Avatar
+0 forum 4

I an trying to write a few java classes, which I wrote successfully, but when I am tryin to test it I get some weird errors and I cant figure out why, so i'd be very grateful for your expertise. The code for the GCD class is: [code] public class GCD { public static long gcd(long x, long y) { while (y != 0) { long r = x % y; x = y; y = r; } return x; } } [/code] This compiles without any problems. The code to test the GCD class is : [code] import java.util.*; …

Member Avatar
Member Avatar
+0 forum 4

Hello everyone, I am a newbie to Ruby. I installed Instant Rails on a Windows Vista machine and whenever I started the InstantRails, it gave an error message "Either Apache or MySQL cannot run because another program is using it's ports." I have checked my firewall settings and couldn't figure out what is causing this error. Can someone help me, please. Thank you, SR

Member Avatar
Member Avatar
+0 forum 2

I am creating a GUI program with java and when I run it, I get this stack of errors. [CODE] Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at ButtonPanel$AllocateListener.actionPerformed(ButtonPanel.java:52) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2475) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) [/CODE] This is the code in my ButtonPanel [CODE]import model.*; import java.awt.*; import java.awt.event.*; import java.text.*; import javax.swing.*; public class ButtonPanel extends JPanel …

Member Avatar
Member Avatar
+0 forum 1

Hi. Firstly, I am a complete noob, and cannot understand complicated answers. OK. I'm making a noobish space game, called Galactic Armageddon. I'm just testing the variables right now (for getting hit by lasers, missiles, etc.). I'm compiling using Dev-C++ and the default compiler. The program is written using the Allegro game library (see [URL="http://www.cppgameprogramming.com"]cppgameprogramming.com[/URL]) When I run the executable, I get an error saying: [B]GA.exe has encountered a problem and needs to close.[/B] It says this straight away, without even opening a window or anything. Here is the code so far: [CODE] #include <cstdlib> #include <iostream> #include <allegro.h> using …

Member Avatar
+0 forum 0

Hi, I have an XP machine and it boots up to just before the Password Screen into windows and displays the blue screen. Just a blue screen, nothing else, and the machine is completly unresponsive. I have tried to enter Windows in safe mode but again, it to just opens the safe mode screen, black with 4 safe mode words at each corner of the screen. Can somebody give me some useful advice on what to do from here? Thanks I Run: XP Pro SP2 2GB Ram Centrino Duo 2.13 ghz Processor

Member Avatar
Member Avatar
+0 forum 10

Hi, I was hoping someone could help me with a C++ string problem. I currently have my program open up a file, read the contents into a string, and then I am trying to look for certain key characters in the string, like < and </. In short, I am trying to read an XML type file. Here is my code so far: [CODE] #include <iostream> #include <fstream> #include <string> using namespace std; int main() { string document; string temp; ifstream infile; infile.open("file.txt"); while (! infile.eof()) { infile >> temp; // Put contents of infile (file.txt) into temp. Temp is …

Member Avatar
Member Avatar
+0 forum 3

This program is intended to determine if a fractions is valid (non-zero, non-negative denominator) and to convert an improper fraction into a whole/mixed number. While running the program I get the message "Floating point exception" after it reads the inputs just inside the for loop. Any insight into what is going on and how to fix it will be greatly appreciated. [CODE]#include <iostream> #include <cstdlib> using namespace std; int main() { int num, numer, denom; // number of fractions, numerator, denominator char slash; // storage for '/' symbol. cin >> num; cout << "num= " << num << endl; for …

Member Avatar
Member Avatar
+1 forum 7

Hi, I obtain the next error when I try debug the code and it is stoped. [QUOTE]ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2 JDWP exit error AGENT_ERROR_NO_JNI_ENV(183): [../../../src/share/back/util.c:820][/QUOTE] Can you help me, please? Thank you very much cordial greetings. stid

Member Avatar
+0 forum 0

I have the following update code but i keep getting a syntax error. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE order_id='105'' at line 21 [CODE]mysql_query("UPDATE status SET id = '". $_POST['id'] ."', user_name = '". $_POST['user_name'] ."', to_serve_on = '". $_POST['to_serve_on'] ."', pri_address = '". $_POST['pri_address'] ."', sec_address = '". $_POST['sec_address'] ."', alt_address = '". $_POST['alt_address'] ."', home_tel = '". $_POST['home_tel'] ."', work_tel = '". $_POST['work_tel'] ."', cell_tel = '". $_POST['cell_tel'] ."', type_of_serve = '". $_POST['type_of_serve'] ."', doc_arrival = '". $_POST['doc_arrival'] …

Member Avatar
Member Avatar
+1 forum 4

[code=c++]class StripChartWindow : public PegDecoratedWindow { public: StripChartWindow(const PegRect& Rect, const PEGUINT TitleId); virtual ~StripChartWindow() {} virtual PEGINT Message(const PegMessage& Mesg); private: PegStripChart* mpChart; PegStripChart* mpChart2; PEGUBYTE mID; PEGUBYTE mSin; PEGUBYTE mID2; PEGUBYTE mSin2; };[/code] This is the part which is givin me errors as below... error C2143: syntax error : missing ';' before '*' error C2501: 'PegStripChart' : missing storage-class or type specifiers error C2501: 'mpChart' : missing storage-class or type specifiers error C2143: syntax error : missing ';' before '*' error C2501: 'PegStripChart' : missing storage-class or type specifiers error C2501: 'mpChart2' : missing storage-class or type specifiers …

Member Avatar
Member Avatar
+0 forum 2

Hey, ran into a little trouble with this, keep getting this error. I went over it many times, but can seem to find where the curly bracket is missing or if I have too many or so. [CODE]import java.lang.*; /** * Carries out the instructions from all the objects. * Enter your names, and be prepared for an all out * BRAWL!!! * * @author Eric Foertsch * @version 2.02 */ public class Game{ private GameBoard gameB; private Spinner spinn; private Player player1, player2, player3, player4; private int whoseTurn; /** * Instantiate's both the Gameboard and Spinner, * Takes user …

Member Avatar
Member Avatar
+0 forum 3

how to rectify the following error ? SMTP server response: 503 Bad sequence of commands. You must specify the recipients of a message before you can send it in php

Member Avatar
Member Avatar
+0 forum 3

Hi everyone, I am running a 32bit windows vista. Whenever i boot it up, i get this annoying error that says "Error loading C:\Windows\System32\hgGwWPhh.dll The specified Module could not be found" PLease help. I've tried everything i know!!:@

Member Avatar
Member Avatar
+0 forum 2

Thanks to the help I recieved earlier, I figured out how to make my other header file and my other .cpp file!! So thank you for that. I am now trying to compile all of my files together, and am getting quite a few linker errors, even though the functions that it is complaining about all exist and have definitions. Can someone help me figure out why I am getting all these errors: [Linker error] undefined reference to `Computer::Computer()' [Linker error] undefined reference to `Computer::setBrandName(std::string)' [Linker error] undefined reference to `Computer::setPrice(double)' [Linker error] undefined reference to `Computer::setMemory(int)' and so on. …

Member Avatar
Member Avatar
+0 forum 4

I had my pc and its Windows XP operating system reformatted and reinstalled (using this method: [URL="http://icrontic.com/articles/reformatting-the-right-way/3"]http://icrontic.com/articles/reformatting-the-right-way/3[/URL]). But after restart, the "Error downloading operating system" appeared. How will I be able to fix this?

Member Avatar
Member Avatar
+0 forum 1

Hi, I am currently writing a chatprogram, and it works fine in FF but it doesnt refresh as it should every 1500ms (set with setInterval("retrieve_messages()",1500) in body tag) in IE. The object ajax is made in previous code. I wrote the following code: [code] function retrieve_messages() { // Checks wether the object is available: if (ajax) { ajax.open('get', 'messageretrieve.php'); // Sends request ajax.send(null); // Function that handles response ajax.onreadystatechange = setTimeout("show_messages()", 500); } else { // AJAX is not useable document.getElementById('warning').innerHTML = 'It is not possible to connect, please update your browser.'; } } // End of retrieve_messages() // Function …

Member Avatar
Member Avatar
+0 forum 4

Here is a sample of the XML that I am starting with: XML: any.xml [code] <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="any.xsl"?> <root> <device> <device_Info> <name>Name 1</name> <type>Type</type> </device_Info> <drive_Pair> <status>Ready</status> <Local> <l_name>10E5</l_name> </Local> <Remote> <l_name>0651</l_name> </Remote> </drive_Pair> #Can be 1 or many <drive_Pair>'s {<drive_Pair> ... </drive_Pair>} # Can only be 1 Totals <Totals> <Local> <l1_invalid_mbs>0.0</l1_invalid_mbs> <l2_invalid_mbs>0.0</l2_invalid_mbs> </Local> </Totals> </device> #Can be 1 or many <device>'s {<device> ... </device>} </root> [/code] XSL: any.xsl [code] <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" standalone="yes" cdata-section-elements="devices" indent="yes"/> <xsl:template match="/root/device"> <xsl:element name="devices"> <xsl:for-each select="device_Info"> <device name="{name}" type="{type}"/> </xsl:for-each> <xsl:for-each select="drive_Pair"> <drive_Pair status="{status}" local="{Local/l_name}" remote="{Remote/l_name}"/> </xsl:for-each> <xsl:for-each …

Member Avatar
Member Avatar
+0 forum 3

When I enter a string that it not in the list, I get this error in my enum CrimeType class: IllegalArgumentException, no enum const class CrimeType.a(in java.lang.Enum [code] public void enterCrime() { Crimes crimes = new Crimes(); System.out.print("\t\tEnter crime: "); crimeName = In.nextLine(); if("murder".equals(crimeName) || "arson".equals(crimeName) || "assault".equals(crimeName)) { crimes.daysToStay(3); } else if("fraud".equals(crimeName) || "theft".equals(crimeName) || "vandalism".equals(crimeName)) { crimes.daysToStay(2); } else if("drunk".equals(crimeName) || "littering".equals(crimeName) || "badHair".equals(crimeName)) { crimes.daysToStay(1); } else { System.out.println("\t\tThat is not a valid crime. The crimes are"); crimes.list(); } crimes.add(crimeName); enterAction(); } [/code] [code] Enum Class public enum CrimeType { murder, arson, assault, fraud, theft, vandalism, drunk, …

Member Avatar
Member Avatar
+0 forum 4

I have been experiencing some blue screens over the past few weeks. This is the most recent one i got. STOP:0x000000F7 Ntfs.sys-Address 880421322 based at 88005000 Datestamp 47918a98 Any help regarding the matter will be greatly appreciated. Thank you!

Member Avatar
Member Avatar
+0 forum 9

The folks over at Gmail have been busy rolling out all sorts of new features in the last few months but the one they dropped on users today is by far my favorite -- [URL="http://gmailblog.blogspot.com/2009/03/new-in-labs-undo-send.html"]Undo Send[/URL]. I don't know a single person who hasn't had the gut-wrenching experience of typing up an email, hitting send, and then realizing you've made a gigantic error. You know the kind: an off-color joke accidentally forwarded to your boss, something written in a fit of anger that should never be read, or an embarassing photo of you at the company picnic wearing a propeller …

Member Avatar
Member Avatar
+0 forum 4

I tried compiling my java program and it gave me the following error: Note: DnldURL.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. What does this mean?

Member Avatar
Member Avatar
+0 forum 3

The End.