hacker9801 49 Junior Poster

you want to read it? easy.
*ahem*

use an ifstream object on the file, read it into an event_info structure (like struct event_info { int something;string event;int x;int y; } )

and simulate the events (mouse_event for mup/mdown, SetCursorPos() for move)

*walks away now*

hacker9801 49 Junior Poster

That would be ASCII, not ANSI ;)

you can mark the thread solved now.

hacker9801 49 Junior Poster

...
USE. CODE. TAGS.

CHANGE IT TO int canidate[5];

hacker9801 49 Junior Poster

Why didn't you read the replies you already got?

He obviously doesn't want to learn and can't google. :P

hacker9801 49 Junior Poster

And there's three problems with your if-statements:

1: == is the comparison operator, not =
2: "cnd1" is not a char, it's a string. canidates[] is a char array.
3: if canidates[] was a char string array, you'd need to use strcpy(), not the assignment operator.

hacker9801 49 Junior Poster

...
you're not going to finish it unless someone does it for you. but nobody will.

hacker9801 49 Junior Poster

Yep. And experiment - if you have an idea you want to implement, start a new file and see if it works.

hacker9801 49 Junior Poster

try using FMOD.

hacker9801 49 Junior Poster

When I first setup SDL I had to go through the includes and remove start_code.h / end_code.h from the includes. Bah.

hacker9801 49 Junior Poster

well, you'd want to change your print function

void print()
{
cout <<"hello, my major is " << major;
cout << ", and my GPA is " << gpa << endl;
}

and, to set it, whenever you make your object you can do something like:

Student x;
x.major = "whatever";
x.gpa = 1.337;
hacker9801 49 Junior Poster

Well it's better to learn a multi-platform GUI library than Win32 functions.

For example, Qt, GTK+ and wxWidgets all work on Windows and Linux, and I'm sure Mac too.

I hate Qt though, had a hard time with it. :P

hacker9801 49 Junior Poster

...
num1 is already of int type, you WOULDN'T be able to enter a character anyway.

jephthah commented: a char is an 8-bit integer. get your basic facts straight before "helping" please +0
hacker9801 49 Junior Poster

Well the function is correct, if it doesn't work you should make sure the data is filled in correctly.

hacker9801 49 Junior Poster

What exactly is it doing & what is the expected output?

hacker9801 49 Junior Poster

You're not calling it. To call a function, use, for example, cd3.returncosts()

hacker9801 49 Junior Poster

your coding style is terrible. Don't be afraid to use more white space -- it won't slow down the compile time any and won't take up any more room on your hard drive.

Seconded. :P

hacker9801 49 Junior Poster

I didn't read it all but change the line in main to:

getData(marital, numChild, exempt, noOfPeople, groSalary, penAmt);

Don't put the data-types in the function calls

edit: and you re-declare alot of stuff......

hacker9801 49 Junior Poster
char buf[100];
int i;

strcpy(buf, "foo");

i = atoi(buf);

that?

hacker9801 49 Junior Poster

Python is an awesome scripting language, and it's very extensible.

I used to use it all the time, but now I'm learning C++. I wouldn't touch java, it's JVM is slow (IMO slower than Python's interpreter) and it's just terrible.

hacker9801 49 Junior Poster

and you can't set php variables from within JS. your code sets $impt to 'Y'.

hacker9801 49 Junior Poster

Here's some code that worked for me.

from Tkinter import *

root=Tk()

class Calculator(Frame):
    
    def __init__(self, master=root):
        Frame.__init__(self, master)
        self.grid()
        self.master.title("CalculatorGUI")
        self.f = Frame(master=self)
        self.f.pack()
        self.g = Frame(master=self)
        self.g.pack()

        self.display = StringVar()
        self.ent=Entry(master=self.f, textvariable=self.display)
        self.ent.grid(row=1, column=1)

	btn_list = [
		'7', '8', '9', '*', 'C',
		'4', '5', '6', '/', 'M->',
		'1', '2', '3', '-', '->M',
		'0', '.', '=', '+', 'neg'
		   ]

	r = 2
	c = 0
	for b in btn_list:
	    rel = 'ridge'
	    cmd = lambda x=b: self.click(x)
	    Button(self.g,text=b,width=5,relief=rel,command=cmd).grid(row=r,column=c)
	    print "Added button '",b,"' w/ grid",r,c
	    c += 1
	    if c > 4:
	        c = 0
	        r += 1
	print "Done adding buttons"

    def click(self, x):
      if x == "=":
        self.display.set(eval(self.display.get()))
      elif x == "C":
        self.display.set("")
      else:
       self.ent.insert(END, x)
        
Calculator().mainloop()
hacker9801 49 Junior Poster

Instead of "self.ent.get()=solution"
are ya wanting to do

self.ent.set(solution)

?
Happy coding.

hacker9801 49 Junior Poster

Actually a few days ago i got bored and thought since they block anything fun at school I would make a chat program to talk with friends. It uses php, mysql database, and a little ajax. Its very simple to do in fact.

I've done that, too.
I'd like to rewrite one with better AJAX, but I can't write a script to cache everything. Plus, takes too much bandwidth SELECTing every [last] messages from the database. :/