Freaky_Chris 299 Master Poster

It's not as easy as it sounds, since there is alot of information in an xls file, ofcourse there are different versions too. http://sc.openoffice.org/excelfileformat.pdf

Normally when you are a beginner looking at something like this, you would use CSV files, as they are much easier to read etc. Please note, we will not provide code solutions for you, you will need to do some work yourself and show evidence of the fact you have done so.

Chris

Freaky_Chris 299 Master Poster

I'm too lazy.

Freaky_Chris 299 Master Poster

Does w3schools even mentiod Java as far as im aware its a web programming site.

Link number 5, didn't you read responses to this thread that suggested you do not use an IDE like NetBeans.

Read the sticky at the top and get started,
a good link is http://java.sun.com/docs/books/tutorial/

Also, I think that http://www.javabat.com has quite a few nice things that will get you to learn the basics of control structures etc...such as if's and loops.

Chris

Freaky_Chris 299 Master Poster

scanf()

Have a quick read over a basic C tutorial

Freaky_Chris 299 Master Poster

It's a combination of the F4 key code combined with the alt modifiers, you need to check both.

But i'd avoid trying to prevent it if I was you....

Freaky_Chris 299 Master Poster

Please use code tags, [CODE=cplusplus] [/code].

Firstly, is this C or C++ because it looks like a strange confusion between the two. The only header you should be using in this program is #include <iostream> not with a .h or anything else funky.

I'd suggest you go back over the very basics of C++ before attempting to use pointers etc...since you are using global variables..which is not good.

And you obviously don't understand pointers...

Chris

Freaky_Chris 299 Master Poster

have you tried

system("pause") ;

?

:O
You could have at least gave a platform independant solution!

cin.get();

oreven better yet, run your commandline program from the commandline/termianl xD

Chris

Freaky_Chris 299 Master Poster

You are trying to return a class object when your function says its return type is void...you missed a semi colon, and you are trying to cout<< a class object, so you either need to change what you are trying to cout or overload the << operator

Chris

Freaky_Chris 299 Master Poster

You are still not using code tags, I expect your replies from now on will be of little help to you, read what I put carefully as it may be some of the last half decent advice you get before people just satrt saying your doing it wrong as it would suit your attitude better.

A) You are using void main, this is WRONG! It should be int main.
B) You are using old C headers, why when we are using C++ I don't know...
C) You are using cin and are completely unaware of the way it works with the input stream, I suggest you do some reading about it and clearing the input buffer, even better consider using getline() as it eliminates lots of problems. There is a sticky at the top of this C++ forum that explains about cin>> and clearning the input buffer and the problems this can cause and how not to do it. That is a VERY good starting point.

Please read the forum rules, rather than just virtually mimicing your original post with a post that is of next to no more help and continuing to violate forum rules.

Chris

Freaky_Chris 299 Master Poster

Well you need to give us a starting point as to what you have, my suggestion is that you have an image placeholder thingy, and then change the source of it when each button is pressed, ofcourse I can't use any technical names because I dis-like MFC :)

Chris

Freaky_Chris 299 Master Poster
while(displaying):
   if 1 min past:
      display time
   else:
      do nothing
loop

Also is this C or C++ code, it looks to me like C, yet you are in a C++ forum. Either way it is buggy.

Chris

Freaky_Chris 299 Master Poster

Well if you are using time.h which should be ctime in C++, then you can simple calculate when the next time a minute has passed so says its currently 12:31 then you can add 1 to that and check to see if the systemtime matches or is greater than it, if so display the time and then add one to the current time.

Chris

Freaky_Chris 299 Master Poster

You were correct, in the fist cast it would take O(N+1) time to push/pop, since it would be N for traversal and 1 for the push/pop.
In the second case it would be O(1) since you already have the last element.

Chris

Freaky_Chris 299 Master Poster

when you use cin>> characters are left in the input buffer, then when you call getline() the characters that are left in the input buffer, thus effectively skipping it.

So you should call that function he has used after your call to cin>> and before getline() to clear the input buffer so that the input stream is clear.

Chris

Freaky_Chris 299 Master Poster

Firstly, please you appropriate thread names, rather than things such as "Help me!" or "Problem!"

Your problem however is the fact that you are calling your constructer as Coord(), not Coord(float, float), and you haven't definded or declared a constructor of Coord().

Chris

Freaky_Chris 299 Master Poster

Damn, forum rules much...did you read?

I'd suggest that you don't post that many lines of code. You are refering to line numbers, yet you didnt show line numbers....[code=language] [/code] tags would have done the job, I suggest you shrink it down to a small example that has the same problem.

Chris

Freaky_Chris 299 Master Poster

Well you might want to use getline(), but the reason it doesn't work is that the ifstream constructor requires a C-Style string i.e. null terminated character array, not an object of type string. Thus you will need to use.

ifstream myfile(fil.c_str());

Chris

Freaky_Chris 299 Master Poster

Thanks,

You managed to resurrect my 5 month old thread.
By the way, I managed to work out that it was the broadcom chip set, which is unsupported by Ubuntu Distro's, and requires ndiswrappers to be installed, once this has been done it fine to connect to wireless networks.

PS. Don't bring old threads up thanks,
Chris

Freaky_Chris 299 Master Poster

ArkM this is the C forum....really should be using printf() so yer lol, but still i thought it was iostream.h in C?

then again I think im just going crazy xD

Freaky_Chris 299 Master Poster

Hate to tell you this, but they don't exist in C either.

Chris

Freaky_Chris 299 Master Poster

You need to pass two parameters to the function, I guess you could always do something like overload /= ?

Chris

Freaky_Chris 299 Master Poster

Have you written your program in MSVSC++? If so then it's probably .NET code and will require the users has .NET framework installed, and that you have distributed the required DLL files.

Chris

Freaky_Chris 299 Master Poster

The other option would be to close the file stream and then re-open, btw be sure to check that you actually need to read the file stream twice, rather than loading it contence into some data structure then reading that again. Just pointing that out because file access is slow in comparison.

Chris

Freaky_Chris 299 Master Poster

If you want to raise something to the power of something then you have two choices,
A) include <cmath> and use its pow() function.
B) Write and recursive, or none recursive power function of your own.

The reason it is spitting out random numbers is because you are calling an integer array when you have not initialized it at any point, see the problem?

Chris

Freaky_Chris 299 Master Poster

I think you should re-read your previous thread about creating 2D arrays witht he new operator. Look at the following two lines, If I remember correctly, I stated that to create a two dimensional array of chars such that you get a 1D array of strings, you should have the two lines that follow after the inccorect ones insead.

var=new char**[ar1];
var[x]=new char*[ar2[x]];

should be

var=new char*[ar1];
var[x]=new char[ar2[x]];

Also I would like to make a very important point. You need to free the memory you used, that means you need to learn how to use how to use delete. Not since this is a two dimensional array you will need to loop through and delete all of the elements at array[x] before delete the array with the use of delete [] array; .

Please be very careful with allocating and deallocating memory, it leads to memory leaks that are really not wanted, and just cause more problems with code and your computer. Plus try to avoid making these mis-takes in future as some people may end up following you.

Thanks,
Chris

Freaky_Chris 299 Master Poster

Well you know you have reached the end of the linked list if the pointer to the next is equal to NULL.

By the way, you can do this with only the original linked listed, so there is no need for extra data structues :) But that might be a task to acheive once you get a working solution.

Chri

Freaky_Chris 299 Master Poster

Do you mean how do you compare the value of crop at one node with the value of crop at another given node?

It's as simple as it sounds....

aNode->info->crop == anotherNode->info->crop

Chris

Freaky_Chris 299 Master Poster

Are you talking about printing out the source code??
If so research Quinnes :)

Chris

Freaky_Chris 299 Master Poster

I find it interesting how When one person comments you can be so blunt and rude, yet when others side with him you are no long quite so rude. No doubt because you realised you were in the wrong.

Freaky_Chris 299 Master Poster

Rectangle myRectangle = Rectangle(); should be Rectangle myRectangle = [B]new[/B] Rectangle(); The second too, I suggest you look at the function. Notice you declare them as taking two parameters yet you call them with 0.

Chris

Freaky_Chris 299 Master Poster
Freaky_Chris 299 Master Poster

You may find your router has a 'virtual server' set up of some kind, if it has then it will allow you to add incoming requests to the list. This will give you the option to have you router watch the information coming on a sepecfic port then forward that request to the internal IP address and port you specify on any computer.

This is how I had my Python server set up, and it worked perfectly. Just remeber accessing the server internally and externally IS different, so test it from an external location.

Chris

Freaky_Chris 299 Master Poster

Your class needs to implement ActionListener. Then ofcourse you will need to set actioncommands etc for each menu item.

Chris

Freaky_Chris 299 Master Poster

Project -> Build Options -> Linker -> add -> gdi32

Chris

Freaky_Chris 299 Master Poster

You need to link "gdi32.dll" into your project :)

Chris

Freaky_Chris 299 Master Poster

Her is an example,

#include <ctime>
srand((unsigned)time(NULL));

int a = rand() % 10 +1;

this code stores a value between 1and 10 :)

Chris

Freaky_Chris 299 Master Poster

I think you can simply check if the first character is a numeral.

Thats what his code does, but that doesn't mean that "1dfjkghdflgh" is an integer, because it isn't. But by your logic it would be.

Chris

Freaky_Chris 299 Master Poster

Also it should be int main and return 0 :)

Chris

Alibeg commented: His posts were quite helpful, yeah :D +1
Freaky_Chris 299 Master Poster

1) Read the rules.
2) Search the forums
3) Show code attempts

Freaky_Chris 299 Master Poster

I'm saying, change where the points in each ListNode points to.

start = head;
temp = start;
start = start->next;
temp->next = NULL;
temp2 = start->next;
start->next = temp;
temp = start;
start = temp2;

Something like that, I'm sure it can be done neater...and of course you want to loop it. But I'm tired and it should give you the right idea :)

Chris

Freaky_Chris 299 Master Poster

trick is, don't move elements change points. Loop through from the start, store the first address, store the address that the next element points to then map it to point to the the first. hope that makes sense.

Chris

Freaky_Chris 299 Master Poster

Should be iostream.h and you should be using std::cout Chris

Freaky_Chris 299 Master Poster

The print statement in python (except python 3) automatically adds a newline at the end.

Should be noted that this can be prevent by doing the following

print "Hello World",

Yup a trailing ','
:)

Chris

Freaky_Chris 299 Master Poster

Well sounds to me like you are going to want to dive into the Win32 API, google it. The documentation on it is amazing.

http://msdn.microsoft.com/en-us/library/aa383749(VS.85).aspx
http://www.winprog.org/tutorial/
http://en.wikipedia.org/wiki/Windows_API
http://winapi.foosyerdoos.org.uk/

I trust you know C/C++ well.

Chris

Freaky_Chris 299 Master Poster
#include<iostream>

using namespace std;

int main(int argc, char** argv){

	int num, i;
	char** a;

	cout<< "how many strings? ";
	cin>> num;
	a = new char*[num];

	for(i=0;i<num;i++){
	        a[i] = new char[80];
		cout<< "enter a string: ";
		cin>> a[i];
	}

	for(i=0;i<num;i++)
		cout<< "string "<< i<< ": "<< a[i]<< endl;

	return 0;
}
Comatose commented: Beat me to it... very quick :) +10
Freaky_Chris 299 Master Poster

You could use <cmath> with sin/cos/tan and implement normal mathematics, just remember that the sin/cos/tan function in cmath are written in Radians :)

Freaky_Chris 299 Master Poster
[segment .text]
  global _main

_main:

Should work with GCC, as for ALINK I think that require .start or ..start as it's entry point.

Chris

Freaky_Chris 299 Master Poster

Should be noted that to append a character to a string you can do this

std::string myString = "Hello, World";
myString.push_back('!');

Chris

Freaky_Chris 299 Master Poster

I'd recommend a read of Narue's tutorial, its a few posts down and is a brillaint intro to NASM on windows :)

Freaky_Chris 299 Master Poster

Well you are not storing them into the array such as, a[x][y]. And your show function shouldn't be recoursive like that...it doesn't even print things out, it just cause lots of problems.

Chris