CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: mikeBarr81

Page 1 of 25 1 2 3 4

Search: Search took 0.17 seconds.

  1. Replies
    0
    Views
    690

    Problem drawing a line to a panel

    Aa
  2. Replies
    3
    Views
    382

    Re: getting closer :)

    You need to clean your 's' key, it looks a little ssssticky ;)
  3. Replies
    5
    Views
    696

    Re: static variables

    In Java static variables and methods can be referenced from non-static methods. How else could the static and non-static context mix? It's the opposite which is impossible, referencing non-static...
  4. Replies
    15
    Views
    1,438

    Re: Out parameters in Java

    I thought Java passed objects by reference. Couldn't the String be altered inside the method, and the method return an int? I doubt this would be very good coding practice though.
  5. Replies
    24
    Views
    3,123

    Re: Assignment Methods

    Well the method is pretty self-explanatory. Your magic square has dimensions (like all squares do). It is N units wide and N units tall, where N is the number of numbers that you have in one row of...
  6. Replies
    3
    Views
    440

    Re: get the time!!

    Oh, there's a quicker way of doing it if you don't mind the time being in milliseconds. Use System.currentTimeMillis() to get the time, but if you want seconds, minutes and hours then the Calendar...
  7. Replies
    3
    Views
    440

    Re: get the time!!

    Take a look at the Calendar class. If you create a Calendar object it will hold the time at the millisecond it was created. You can then get any information about the time (or date if you wish). Take...
  8. Replies
    2
    Views
    495

    Re: Number Algorithm

    Not really a lot of mathematics at all. Just model it on how you would do it in the real world. The easiest way to do it would be a lottery style. You have a bag of numbers and pick them out one at a...
  9. Re: :( multi client server - on client join call object

    I couldn't properly tell from your post but it sounded like the class that deals with new connections is also the class that looks after the connections once they're made yes?

    What you need to do...
  10. Replies
    12
    Views
    1,442

    Re: Arrays help!

    Are you saying that you want to make sure the user doesn't enter the same integer twice? If so you're going to have to have a method that checks each integer the user inputs, make's sure it is...
  11. Replies
    1
    Views
    423

    Re: Help with simplifying my method

    Well the reason the second one won't compile is because you're using the wrong "equals". The assignment make equal to uses one equals sign. ie

    variable1 = variable2;

    The boolean comparison is...
  12. Thread: arrays

    by mikeBarr81
    Replies
    1
    Views
    317

    Re: arrays

    I think this question has already been answered here . Did that thread answer your question, or do you still have problems with this?
  13. Replies
    12
    Views
    1,442

    Re: Arrays help!

    Ok, I think I see what your problem is. In your first loop, the variable index runs from 0-9. In the second one it still equals 9 when you start, so you'll get an out of bounds exception since the...
  14. Replies
    12
    Views
    1,442

    Re: Arrays help!

    Firstly what is the problem with the print out? Do you get a compile error, or does it compile but not print out the way you want it?

    Secondly, why do you put all the numbers into a one...
  15. Replies
    3
    Views
    622

    Re: '+' operator problem

    If you want to add two Distance objects together you're going to have to write a method in the class Distance to do this. for example...


    public Distance add(Distance d)
    {
    Distance result;...
  16. Replies
    3
    Views
    622

    Re: '+' operator problem

    The methods convertFeet() and convertYards() both return a distance object. The plus operator can only be applied in specific instances (such as for primitives or for String objects), and it can't be...
  17. Thread: Converstion

    by mikeBarr81
    Replies
    3
    Views
    597

    Re: Converstion

    What it printed is the memory address of the Distances object you tried to print. When you pass an object to System.out.print() (or println()) it will call the toString() method all Objects have. The...
  18. Replies
    2
    Views
    641

    Re: array of Vector

    It sounds to me like you're describing a ragged array. That's a multi-dimensional array where each array is a different length. You don't need vectors (or anything else) to do that, you just need...
  19. Replies
    4
    Views
    1,121

    Re: Writing text to a file

    I'm sure we've all made mistakes like that before :) No one is immune from typos.
  20. Thread: Key Events

    by mikeBarr81
    Replies
    4
    Views
    607

    Re: Key Events

    I see them now...I accidently checked an old version of the API and those fields weren't there. Feel a fool now :blush: hehe
  21. Replies
    4
    Views
    568

    Re: Getting wrong answers for conversion

    It was definately there last time I checked the thread. It must have been removed.
  22. Thread: Key Events

    by mikeBarr81
    Replies
    4
    Views
    607

    Re: Key Events

    I've had a look in the API and I can't seem to find those fields. Could you give me a link to them in the API please?
  23. Replies
    21
    Views
    1,607

    Re: Strange Java Hacks Return/For(;;) etc

    The variable that is of type Comparable is used as a paramter in the method, and is thus external to the class in question. That class doesn't need to implement the Interface, just the class of...
  24. Replies
    3
    Views
    396

    Re: Pass by Value Problem

    So to make sure I have this straight, you want a value from the Panel class to be passed to the Cost class. If so, then you seem to be a bit confused about what your methods are doing.


    public...
  25. Replies
    13
    Views
    1,801

    Re: Convert object class to actual class

    It sounds to me like the OP wants to create an object that is of unknown type at compile-time, so won't be able to write that. Design problem maybe??

    OP, why would you want to create an object of...
Results 1 to 25 of 624
Page 1 of 25 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)