auLucifer

Members
  • Content count

    65
  • Joined

  • Last visited

Community Reputation

115 Neutral

About auLucifer

  • Rank
    Member
  1. Banning the MAC - possible?

    I thought the only time the address changed was when NAT was used. So this typically occurs at the private network at the start but never past there as the larger and more used gateways would need some impressive live routing tables. This is just what they were teaching us at UNI...
  2. Banning the MAC - possible?

    The IP Packet actually contains both addresses. A Destination mac address and the sender mac address. If it didn't contain both then there would be no way to determine where to send the packet to and from. I should have a powerpoint presentation that covers it around here somewhere from uni. If you want it just message me your email address and I'll send it. Might have to give me a couple of days with all the giftmas festivities ;)
  3. [4E4] #9 Toy Robo

    Was a pretty good game The camera does seem a little ungainly but overall it was good. Locking onto an opponent would be awesome although shooting them isn't too hard. I didn't play right through. Just the first few levels. Anyways With my AMD 2800+ mobile 512mb ddr 64mb Radeon 9600m I never dropped below 130 fps.
  4. int to char

    Microsofts VC IDE contains a function called itoa that does what you need. This is within the stdlib I think. http://www.cprogramming.com/tips/showTip.php?tip=19&count=30&page=0 gives you examples on how to do it in C and C++. The C++ way is exactly the way it was mentioned before and the C version gives you more details then was shown before with sprintf. *edit* Well not exactly more then the post above. That was posted while I was doing this. A lot less commenting on the site though ;)
  5. strlen problems

    Its bizarre that the original strlen doesn't work It might be because there is no '\0' at the end of your string but typically the compiler terminates strings like that... Try char *sstart = str; // Where str is the string you want the length for while(*str)++str; int slength = str - sstart; Thats similar to the one I use but it also relies on a terminating null character. One question I do have is what is the L for?
  6. C# Interface, C++ Engine

    I've done this sort of stuff before using SDL before I found SDL.NET How I get them to communicate is through using DLL's. C# can read and manipulate C++ DLL files similar to how C++ does so this might be a good place to start.
  7. That works perfectly fine with me in .NET 2003 so there must be a problem somewhere else in the code... Like someone said before. If you show more code then it might be easier for us to find your problem.
  8. The glut display function pointer is: void (*display)() Nice and simple Also as it appears you will be taking keyboard input the keyboard function pointer looks like: void (*keyboard)(unsigned char key, int x, int y)
  9. timer in c++

    There is a function in the ctime header called time. It returns time_t which is a struct. (A quick Google search will show you what is within it) Using that within a for loop would do what it sounds like you want.
  10. Massive array

    Quote:Original post by smart_idiot auLucifer, your code doesn't work. Ah k Sorry about that. I just quickly entered it while not at my dev machine so I couldn't test it.
  11. array[n++] ?

    Quote:Original post by Nice Coder Quote:Original post by auLucifer ++n; array[n] = n; Is also wrong as you are incrementing n before it is used anyway. In array[n++] = n is being incremented after it is used. As was said above Eh? Wrong increment. Also, that is the right way to do it. Why? Its a preincrement. You increment it before you execute the statement. Just check yur compiler output. No secrets there. Check the compiler output? It will compile all well and good but it won't generate the same results as required in a post increment. As was requested by the original post (array[n++] = n;) The guy is obviously a newb so it needs to be stated more clearly what you are saying as when I read your post it seemed that you were in regards to the original. The post you tried to correct therefore said exactly the same thing so you did copy what someone else said. Quote:Original post by Nice Coder Quote: Original post by auLucifer array[n++] = n; is the same as array[n] = n; n += 1; but array[++n] = n; is the same as n += 1; array[n] = n; Do i have to tell you this, or did you already notice. I already said that. I was expanding on what innmate2993 was saying. Only one of the 2 statements you said was right in regards to the original question so therefore you did NOT say what I said. array[n] = n; n++; Only that was right but I wasn't commenting on that when I stated what you quoted then. Quote:Original post by Nice Coder Quote: n += 1; array[n] = n; From you Quote: ++n; array[n] = n; From me. ++n; is exactly the same as n += 1; From, Nice coder But the original post was not going on about array[++n] = n; It asked for array[n++] = n;
  12. Massive array

    You are working with a 3d array so you will need to define it as such node ***nodemap = new node[500][500][500]; *edit* Thats not quite right for a 3d array You need to allocate for each pointer; node ***nodemap = new node; *nodemap = new node[500]; **nodemap = new node[500]; ***nodemap = new node[500]; [Edited by - auLucifer on July 6, 2005 6:54:40 PM]
  13. New DAWN OF FANTASY Screenshots!

    I think all that I can say is wow... Those screens are incredible. Keep up the good work.
  14. array[n++] ?

    Quote:Original post by Nice Coder Quote:Original post by DigiDude n++; // pretty much the same array[n] = n; or array[n] = n; // also pretty much the same but ++n; Eh, don't you mean Array[n] = n; n++; Or ++n; array[n] = n Other way round... Pre vs post increment. From, Nice coder ++n; array[n] = n; Is also wrong as you are incrementing n before it is used anyway. In array[n++] n is being incremented after it is used. As was said above array[n++] = n; is the same as array[n] = n; n += 1; but array[++n] = n; is the same as n += 1; array[n] = n; It is very handy in loops as it reduces by a line and reduces the need for extra braces which therefore makes it easier to read the code as it is tighter and you don't have to follow it through to another brace. The biggest thing though is if you do compress code into fewer lines you really need to give it a comment so people actually know whats happening. I love reducing code to fewer lines as it is faster to program but I always place comments around complicated code so its easier for me and anyone else I work with to read later.
  15. Unknown runtime error

    bad_alloc is thrown when you are unable to allocate memory. Perhaps you have an infinite loop somewhere or something like that.