predator78 22 Junior Poster

Great suggestions this is how I have always done it as you are describing was just curious if there was a better or more appropriate way. And yes jwenting I was thinking that the user or "player" will request a seat at the table, when that method is called it should then check with the table class and ensure that the seat is not already taken. Not sure what diffrence of a list or an array you are talking about though as I have considered them to be the same thing. Right now my array is like so.

chairarray = {1,2,3,4,5,6,7,8}
//now if a user requests a chair at say element 1 in the array it updates it like so
chairarray now holds {1,0,3,4,5,6,7,8}
So then all I check is if there is a zero in my array I know the seat had been taken.

predator78 22 Junior Poster

Agreed I thought it was hilarious that Metallica actually chose to sue their fans and napster when they probably gained a fan base they never would have reached without the help of the internet. Guess it would be to much "work" to do a tour with their newly created fan base compliments of the company they sued :).

predator78 22 Junior Poster

Did you give the tutorial a go and run into a specific problem? Or would you like someone to rewrite a tutorial here? Just glancing at the link givin to you I found the answer to question 1 in the first couple paragraphs. Question 2 is a few lines down from that. question 3 will be obvious when you write some of the code in the tutorial and get it working correctly. Question 4 was proven to be true by the link duoas provided you with.

predator78 22 Junior Poster

Just some other thoughts about copyrights....
1. Would you personally sue a 12 year old little girl and her family because she happened to be smart enough to download a torrent and gain access to something you created and own rights to?

2. Would you personally sue the creater of a program that allows people to share files which could pottentially be used illegally?

3. Would you personally sue websites that premote the use of file sharing programs?

4. If you were the creater of a program like adobe photoshop. Would you personally sue a hard working person who pays their bills but barely scrapes by just as many of us do, and this person downloaded your material for free and used the program for personal use?

5. Consider the same person in question 4. Now he decides he is going to start downloading multiple copies of your software and sell them at a cheap price to his buddies who would like the software. Would you sue him now?

Point of fact is there are many senarios that can be played out, and each case should be handled seperatly and decided on by the owner of the product.

predator78 22 Junior Poster

>> felony charges for even minor infractions

By definition this is unfair. Felonies are by definition "serious" or "grave" crimes.

"United States copyright law governs the legally enforceable rights of creative and artistic works under the laws of the United States."

By definition under copyright laws this is a serious crime. Not that I agree with it but according to the United States government copyright infringement is a serious crime.

predator78 22 Junior Poster

Not sure where all the hostility in this thread is coming from. There "are" many very obvious benefits which a few of the main ones have already been pointed out. The best and most obvious would be the fact that a gaming system could be converted into a quite powerful pc at a very cheap price. If that's not a good enough reason than you are rich enough that not much will impress you anyhow. In this case put your money to greater use such as world domination or something less boring than stating that someones great work and inventiveness is somehow pointless and meaningless. Or you could please let everyone in on the latest article not written by yourself that is about you and your greatest last acheivement possibly.

predator78 22 Junior Poster

Yeah same np. I'm just getting some strange message from a moderator for some reason stating that this thread has been moved or something and reffering to reading the rules. Not sure why I am recieving it that's all. Your response was indeed a better choice of words, and I was refering to the issue of the private message I seem to be recieving from this post rather than your response.

predator78 22 Junior Poster

IMHO both take a similar personality to preform the tasks that the jobs would consist of.

Database
--------
Troubleshooting and lots of patience
Extreme attention to detail
Will work with some hardware but probably mostly dealing with software
You will probably not be rewarded for things working only called out when they are not
Probably will not need to be as genius with numbers as a networker depending on the type of database you are working with
If the database goes down it should be the networkers job to unsure your backups are implimented so you can rest easy while the buck is passed to him in this situation

Network
-------
Troubleshooting and lots of patience
Extreme attention to detail
Will work with both hardware and software on a regular basis
You will probably not be rewarded for things working only called out when they are not
Need to have excellent math skills
Most likely resposible for any problems with the network including connectivity, outages, security. If you specialize in security you could be looking at a healthy paycheck.

predator78 22 Junior Poster

My post was intended to be sarcastic apperently some people misinterpreted my text and I appologize. I was trying to convey the same point as you firstPerson. And by google I mean he can gain the tools he needs to do the coding through google searches. The reason for my response as it was is he is simply asking for an answer without giving any effort first.

predator78 22 Junior Poster

There were quite a few errors in the code. I tried to resolve them first, but a rewrite seemed to work better and clean things up a bit. You may want to change a few items such as I described all the variables as floats. You didn't declare many of them in your attempt. Also you were missing a few semicolons at the end of statements. And not sure if .06f was intensional or a mistake fixed that as well.

// File : name.cpp
// Description: Does stuff with stock
// Programmer: name
// Date: 5/23/11

#include <iostream>
using namespace std;

int main()
{
	float stock;
	float numberofstocks;
	float singleshareprice;
	float GrossStockProceeds;
	float NetProceeds;
	float commission;
         float COMMISSION;
	cout << "enter number of stocks: ";
	cin >> numberofstocks;
	cin.clear();
	cin.ignore(1000,'\n');
	//cout << numberofstocks << endl;

	cout << "enter single share price: ";
	cin >> singleshareprice;
	cin.clear();
	cin.ignore(1000,'\n');
	//cout << singleshareprice << endl;

	GrossStockProceeds = numberofstocks * singleshareprice;
	//cout << GrossStockProceeds << endl;

	COMMISSION = .06;
	commission = GrossStockProceeds * COMMISSION;
	//cout << commission << endl;

	NetProceeds = GrossStockProceeds - commission;
	cout << NetProceeds << endl;

		return 0;
}
predator78 22 Junior Poster

Well what direction do you want it to move and when? You should only have to specify an offset for your new location. For example (x+1),(y+0). Beyond that I believe we may have to take a look at your code to see what you are trying to achieve.

predator78 22 Junior Poster

i want program that get a string from usre an display it reverse lke this
input (noor)
ouptut (roon)

Then you need to put some effort in like hawita has and start your own thread if you have problems. If you simpy want to copy code I'm sure it will be easy enough to google a snippet like this. I hope you didn't pay to much for the class your taking in that case though cause you are not going to get much out of it.

predator78 22 Junior Poster

Those are the coordinates you need to set for a traingle. Most graphical programs use an x,y coordinate system like so.
|-----------------x
|(0,0) (1,0) (2,0)
|(0,1) (1,1) (2,1)
|(0,2) (1,2) (2,2)
y

A triangle can be described as 3 points or this may also suprise you but possibly 4 points. If we start our triangle at (0,0), next draw a line to (0,2), then a line to (2,2), to finish we draw a line back to (0,0).

predator78 22 Junior Poster

Why is the ghost from deathly hallow constantly trying to butt in line. He's just trying to get ahead.

predator78 22 Junior Poster

Ok I have known how to build classes for quite a long time now, and I understand attributes and methods. But from a design point of view how literally should I take these? For example I have a class Player and a class Table.

class Player:
attributes:
name
id
methods:
setname
takechair ??

or since

class Table:
attributes:
chairs array
methods:
takechair ??

Should the table take care of the takechair method since I'm not creating a class chair and decided to put the chairs array in Table? Or should the player have a takechair method because in real life the player would sit in the chair thus taking it?

predator78 22 Junior Poster

1. google
4. google
5. google

predator78 22 Junior Poster

Type void shouldn't return any value. If you want a return value you should declare the function of the type you are returning. In line 3 you declared void input which would be correct, but the parameters are floats and there are two of them so you can't declare it as (void) it should be (float a, float b.).

predator78 22 Junior Poster

The assignment doesn't appear to say anything about that the only thing your missing as far as I can tell is the check to make sure yearsWorked can't be set to a value less than zero.

predator78 22 Junior Poster

*hint*
00
01 we hit the wall here by moving to the right
10 if we reset the right variable here we can try again moving down first
11

predator78 22 Junior Poster

That is all in the design of your function. You are setting the condition statements so make sure it keeps going until all paths have been traversed. A recursive function is basically a loop, how would you go about finding every possible combination of numbers in a loop?

predator78 22 Junior Poster

How about if(rightcount<2){rightcount++;movestring+='R'} for starters then we can say robotmove(rightcount,downcout);. That should get you pointed in a direction.

predator78 22 Junior Poster

That's possibly your first mistake. The robot doesn't need any help from a user pressing a key. You simply call the function and the robot runs through every possible path with no input other than the algorithim you use in the function.

predator78 22 Junior Poster

That is the name of the function and you could in theory make something move with the code if you had something to move. If it's following a path it is moving from one position to another to find it's way.

predator78 22 Junior Poster

Yes your logic is correct. Now you need to write a recursive function that will produce the same outcome. You figured the logic for the solution but not how to solve for the solution that would be the next step. Write the function now in english like you did for the solution.
ex. robotmove(rightcount,downcount)
if rightcount equals somecondition:
then do stuff possibly call robotmove again with my new parameters?

predator78 22 Junior Poster

Sounds like a homework question of some sort. And your question is somewhat unclear. Program to make diffrent combinations of what exactly. And yes it will be a function if it is recursive. Recursive functions make a call to "themselfs" until a condition is met. Here is a link to a sight with some great tutorials I would suggest you read through it. This page contains information on recursive functions.
Functions2

Give it a try yourself if you have problems with the code or questions after you have done some of your own research anyone here will be happy to help out.

predator78 22 Junior Poster

It's hard to tell without seeing the exact page and code your using what the problem is. If there is an issue with providing that information I would suggest doing what you seem to have done already again which is to navigate the sight manually first and take good note of how you are reaching the page you are requesting. Is it some sort of popup? Is it possible you need to keep track of cookies? etc...etc...

predator78 22 Junior Poster

Yeah I did a bit of research on this topic and seems to be a common occurance. You should attempt a boot into safemode if possible and try to restore or repair the system. I would honestly advise against downloading most antivirus software in the first place and if you do be very sure you are downloadin it from the vender. It seems even if you are getting it through this vender though they seem to have any occurances such as this. Personal opinion use avg for what it's worth I personally back up all my data that way if I get a virus I just reimage my computer and like magic it's fixed. Another great point from a securtiy stand point if you are visiting alot of sights you are unfamiliar with do it through a virtual pc that way if you happen uppon something nasty it applies the virrus to the virual machine and you simply zap it and create a new one.

predator78 22 Junior Poster

You need to do it like tonyjv is suggesting. The movements shouldn't need individual loops for each object only one main loop is needed. In english it should look kinda like this.

main loop for game starts
ex. while true

check for events here send important events to objects like pacman and ghosts
ex. w key pressed pacman.movement('w')

after events you can probably squeeze in time for collision checks here or let the objects themselves do it.
movment()
w
if hits wall or ghost do this

restart loop

predator78 22 Junior Poster
predator78 22 Junior Poster

As jingda pointed out you probably need to make a new thread on this one since it has been so long since you posted. Some suggestion if you really wanna get this solved as well. As techsheaven pointed out to solve a networking problem much information is needed. You should provide a list of information rather than a once sentence reply of what you attempted. Some things you might include.

1. Operating System
2. Firewalls
3. Screenshots of network configuration and any errors you are recieving

And remember for any networking problem you want to be 100% sure that you have the physical layer working first!! All wired or wireless devices including the wires themselves must be proven to work or you will never see the network.

predator78 22 Junior Poster

Yes I did misread I though you said it was crashing. Anyway if you have searched google you should see that many of the issues have been hardware related to the graphics card. I would recommend that you first try to set the software to not allow the computer to shut down the moniter. If all seems well then enable the option to turn off monitor and make sure that the hardware is set to wake it up!! If that doesn't work and you happen to have an extra graphics card laying around you could pop it in and be sure to update the drivers and see if that works. Beyond that turn the option to put the monitor to sleep off and use a decent screensaver.

predator78 22 Junior Poster

Yes that's definatly possible although I would think the anitivirus would probably quarantine those files and not destroy them without permission. If you have your install cd boot from that and attempt a repair.

predator78 22 Junior Poster

Offense taken.
From that standpoint my points are valid and, most certainly, not stupid.

Not stupid but incorrect, I assure you it can be done programmaticaly how do you think virtual memory which "IS" what is being discussed was done in the first place.

predator78 22 Junior Poster

I have never heard of Kaspersky internet security from the sounds of the way it went down possible virrus. If you made a boot cd use that or you could download a copy of linux to get booted from the cd and attempt to either retrieve your information and do a clean install of windows, or attempt to run a virrus scan and get rid of the virrus if it hasn't done to much damage already. Hopefully you have already backed up your information, if you havn't I can safely bet you will from now on.

predator78 22 Junior Poster

Crash and freeze could be a hardware issue could be the graphics card or ram. If you have more than one stick of ram take one out and try with one, then the other and see if problem persists. If that doesn't work you may try your graphics card in a pc known to be working and see if that's where the problem lies.

predator78 22 Junior Poster

Well... Being overly generous to the pyschopath side, I got a 5.

I do know a friend who would probably get like a 20-30 at least, however.

Haha I have a few freinds like this. I think the pathological lying should have a higher scoring limit than 2. My one buddies believes his lies so much he is physchotic on this fact alone :D.

predator78 22 Junior Poster

Does profile or anything below it match the spacing above it? Looks a little off to me. The r in profile is under the # in the line above it.

predator78 22 Junior Poster

Ok well maybe I will fool around with some simpilar arrays to learn even more about them, they are a bit more in depth then I would have first imagined. I should be able to figure out what's wrong with what you have givin me. I suppose after some tinkering around with this I'll have a good look at std::vector. Thank you so much for your time and patience ancient.

predator78 22 Junior Poster

Don't worry about the usless files just get rid of them. Click the windows icon in the lower left corner of the screen, goto control panel, goto system and security. Under administrative tools it will say free up disk space. Run that and click anything taking up space as you don't need these for proper operation. Also if you don't have a schudule set to defragment your hardrive that option is next to free up disk space, you can run this as well to enhance preformance.

predator78 22 Junior Poster

Not sure with all the responces if this was braught up but you could also just install microsofts virtual pc and it comes with xp mode which would allow you to run your computer as if it was actually running xp.

Edit: Lol just looked at the post above me... Best option by far in my opionion as well.

predator78 22 Junior Poster

Ok I changed up the pointer to the array of objects but now at runtime it seems to be making calls to set_name() for every new element in the array. I was expecting it would only call it once per creation of the object any ideas on that? Here is the new code.

#include <iostream>
#include <string>
using namespace std;

// player class
class Player{
	int *position;
	string name;

public:
	Player();
	~Player();
	void set_name(){
		cout << "enter name: ";
		getline(cin,name);
		cout << "name is now: " << name << endl;
	}
	void print_pos(){
		cout << name << " is in position: " << *position << endl;
	}
	void set_pos(int pos){
		*position = pos;
	}
};

Player::Player(){ // main constructor
	position = new int;
	*position = 0;
	set_name();
}


Player::~Player(){ // destructor
	delete position;
}


int main()
{

	int num_players = 0;
	int exit = 0;
	Player* player;
	do{
		cout << "1. Create player\n9. Exit\n";
		cout << "Choice: ";
		cin >> exit;

		if(exit == 1){
			num_players += 1;
			player = new Player[num_players];
		}
	}while(exit != 9);
	delete[] player;
	return 0;
}
predator78 22 Junior Poster

Yeah position doesn't really need to be a pointer I'm just playing around with a few concepts as I am new to c++. I see what you are saying about it not being in scope but I do want it to add new players at that position in the code so I would declare at line 43 and then leave my new statement in the same location?

predator78 22 Junior Poster

That is exactly where the problem is look directly above that line buddy :).

predator78 22 Junior Poster

Hi from what I have seen this should be correct but compiler is complaining.

#include <iostream>
#include <string>
using namespace std;

// player class
class Player{
	int *position;
	string name;

public:
	Player();
	~Player();
	void set_name(){
		cout << "enter name: ";
		getline(cin,name);
		cout << "name is now: " << name << endl;
	}
	void print_pos(){
		cout << name << " is in position: " << *position << endl;
	}
	void set_pos(int pos){
		*position = pos;
	}
};

Player::Player(){ // main constructor
	position = new int;
	*position = 0;
	set_name();
}


Player::~Player(){ // destructor
	delete position;
}


int main()
{

	int num_players = 0;
	int exit = 9;
	while(exit != 9){
		cout << "1. Create player\n9. Exit\n";
		cout << "Choice: ";
		cin >> exit;

		if(exit == 1){
			num_players += 1;
			Player* player = new Player[num_players];
		}
	delete[] player;
	}
	return 0;
}
error C2065: 'players' : undeclared identifier
error C2541: 'delete' : cannot delete objects that are not pointers

Thank you greatly for your time.

predator78 22 Junior Poster

29, I didn't break the 30-40 mark. Booyah!

Only a true phsycho could be that proud of the acheivement please add 5 to your score plz. lol.

predator78 22 Junior Poster

Lol gotta love geek humor, pretty sad I even laugh at myself when I find myself in a bad case of mislogicitus.

predator78 22 Junior Poster

Depending on the page you probably need to login to fb first before you can access that page.

VulcanDesign commented: Thanks for the help! +2
predator78 22 Junior Poster

The problem is the cd drive can't be read louis you have to work from the ground up on this one and should in most cases anyway. Every time you start with software and go down you will most likely wind up wasting alot of precious time.

predator78 22 Junior Poster

From the sounds of it, it sounds like a driver issue, but that really doesn't make much sence either as it should be using a generic set of drivers anyway. Maybe not a loose connection, maybe bad wires, powersupply, not connected to the motherboard properly? Do you have any lights on the drive, be 100% you are gettin power before moving on.

predator78 22 Junior Poster

Get a windows cd and uninstall and reinstall all the networking components including tcp/ip.