Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C/C++ or Java
#11
Nath thats theoretically possible. But I think ppl will use C with OpenGL rather than using either C++ or Jave.
Reply
#12
I always thought people used C++ or VB for internet because of Winsock.
Reply
#13
What do you mean by used c++ or vb for internet because of winsock?
Reply
#14
Someone told be before that its really easy to make internet app with Visual Basic. You use TCP/IP protocols easier with Winsock or Tocsock for chat app's or something like that.
Reply
#15
Yeah, chat apps or IMs like MSN, yahoo are coded in VB or C++. But the ones you see on webpages are coded using Java =).
Reply
#16
What are you talking about, no banana? *Eats banana*
And yes, I am talking about precisely that - runtime speed. Any popular C or C++ compiler will outstrip any popular (although I only know of one for the PC) Java VM.
True, a well-coded game (but only in the instance of that - a game) will not have any differences. Although you might not be only making games. I've coded (to a very small extent only, I admit) in Java, and found it far less powerful than C or C++. All that because of one reason: pointers.
They make linked lists actually fun.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#17
Well guys, i've started going into C, and I like it better then C++ somewhat because you have to include every little detail. I like using printf then cout >>. I was looking at how stuff works.com and found it, http://computer.howstuffworks.com/
Reply
#18
Quote:[...]and found it far less powerful than C or C++. All that because of one reason: pointers.
They make linked lists actually fun.

You can do everything you want in Java. It doesn't have pointers, but it has references. IMHO, it is fairly easier to work with references (there is a subtle difference with pointers).

As I've stated previously, you are comparing compiled C++ with interpreted Java bytecode. Get a true Java compiler and benchmark.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#19
One rarely uses Java with a compiler.
And I didn't know about references in Java...
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#20
Quote:One rarely uses Java with a compiler.

That doesn't make a language slow. The fact that we are using QB instead of a better compiler doesn't make BASIC slow.

About references, see: this class (Bienlazable) is used to create double linked lists (each node is linked to the previous and the following node). Nodes in a list are of this type:

Code:
package tad;

public class Bienlazable
{
    Object info;
    Bienlazable previous, following;
    
    public Bienlazable(Object info, Bienlazable previous, Bienlazable following)
    {
        this.info = info;
        this.previous = previous;
        this.following = following;
    }
    
    public void setFollowing(Bienlazable following)
    {
        this.following = following;
    }
    
    public void setPrevious(Bienlazable previous)
    {
        this.previous = previous;    
    }
    
    public void setInfo(Object info)
    {
        this.info = info;    
    }
    
    public Object getInfo()
    {
        return this.info;    
    }
    
    public Bienlazable getFollowing()
    {
        return this.following;
    }
    
    public Bienlazable getPrevious()
    {
        return this.previous;
    }
}

See how inside the declaration of Bienlazable you can assign another two Bienlazable objects. You are using its references to make the links. As you see, no pointers needed, no memory allocation needed. This is, by all means, simpler and cleaner.

This makes a three elements list:

Code:
Bienlazable n1, n2, n3;
int a=1, b=2, c=3;

n1 = new Bienlazable(a, null, null);
n2 = new Bienlazable(a, n1, null);
n1.setFollowing(n2);
n3 = new Bienlazable(a, n2, null);
n2.setFollowing(n3);
(of course, it would be better to write complete code for a List objects. Using interfaces, you can use different approaches to build nodes and/or lists, and all them would work the same).
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)