Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

MS Visual C++ sucks lots of ass

Name: Anonymous 2005-07-25 21:25

Im using it in a class of mine...and I have crashed it 4 times in the past 3 hours....in programs that go to the extent of this
(In this programs case it crashed while building because I forgot a }....so sad...)

#include<iostream.h>
class Item
{
    int number;
    float cost;

public:
    void getData(int a, float b);
    void putData(void);

};

void Item :: getData(int a1, float b1)
{
    number = a1;
    cost = b1;
}

void Item ::putData()
{
    cout<<"number: "<<number<<endl;
    cout<<"Cost: "<<cost<<endl;
}




int main()
{
    Item Item1, Item2, Item3;
    Item1.getData(20, 200);
    Item2.getData(13, 120);
   
    Item3 = Item2;

    Item1.putData();
    Item2.putData();
    Item3.putData();
   
    return 0;
}

Name: Anonymous 2005-07-25 23:23

How about actually learning C++ first...?

Name: Anonymous 2005-07-25 23:26

nah...with visual C++ everythings fucked up...it looks like it should work...I learned on that too, shit sucks.

Name: Anonymous 2005-07-26 6:01

I learned on Borland, it was pretty OK.
g++ ftw though.

Name: Anonymous 2005-07-26 9:41

There's always Dev-C++.

Name: Anonymous 2005-07-26 14:00

use g++ problem solved

Name: Anonymous 2005-07-26 18:09

>>1
please replace getData by setData at once, you're not getting anything here, you're setting those values. And create two != methods: setNumber(int) and setCost(float).

The putData method is awful two: an object shouldn't be aware of its environment and print anything on the screen (or call it toString or debugPrint...). Use:
cout << object.data () << endl; instead.

Name: Anonymous 2005-08-07 14:20

It actually helps if you DO program the operator "="

Name: Anonymous 2005-08-07 16:56

Unless of course you /like/ Java's foo.equals(bar) bullshit.

Name: Anonymous 2005-08-10 7:12

>>7 is right on.  Your get/put semantics are reversed.  And while you're at it, C++ uses <iostream> with the iostream entities in the std namespace, not <iostream.h>.  What version of MSVC++ are you using?  5 or 6?

Name: Anonymous 2005-08-10 10:14 (sage)

>>9
Disregard that, I don't know the difference between = and ==.

Name: Anonymous 2006-04-03 14:43 (sage)

LOL
<code>
lol internet
</code>

Name: Anonymous 2006-04-03 14:43 (sage)

LOL
lol internet

Name: Anonymous 2006-04-09 15:17 (sage)

>>11
Also note that you can create an array this way too:
Box boxen[] = {new Box(br.readLine(), new Box(br.readLine(),...new Box(br.readLine()};

Name: testing 2006-04-09 16:18 (sage)

blah, blah, blah
STUFF GOES HERE

Name: Anonymous 2006-04-12 6:39

code?

Name: Anonymous 2006-04-12 11:24 (sage)

Try this instead:
class Item
  attr_accessor :number, :cost

  def to_s
    "Item: number = #@number, cost = #@cost"
  end
end

Name: Anonymous 2006-04-12 13:23

OP needs better computer--mine works flawlessly

Name: Anonymous 2008-08-04 16:11

                      ∧∧
                     ( ゚∀゚) ~Jeepers,
                     ⊂  つ
                     (つ ノ
                      (ノ
             \      ☆
                     |     ☆
                  (⌒ ⌒ヽ   /
            \  (´⌒  ⌒  ⌒ヾ   /
              ('⌒ ; ⌒   ::⌒  )
             (´     )     ::: ) /
          ☆─ (´⌒;:    ::⌒`) :;  )
             (⌒::   ::     ::⌒ )

Name: Anonymous 2008-08-04 16:12

                      ∧∧
                 ( ゚∀゚) ~Jeepers,
                     ⊂  つ
                 (つ ノ
                      (ノ
             \      ☆
                 |     ☆
               (⌒ ⌒ヽ   /
            \  (´⌒  ⌒  ⌒ヾ   /
              ('⌒ ; ⌒   ::⌒  )
             (´     )     ::: ) /
          ☆─ (´⌒;:    ::⌒`) :;  )
             (⌒::   ::     ::⌒ )

Name: Anonymous 2008-08-04 16:16

                      ∧∧
                 ( ゚∀゚) ~Jeepers,
                     ⊂  つ
                 (つ ノ
                      (ノ
             \      ☆
                 |     ☆
               (⌒ ⌒ヽ   /
            \  (´⌒  ⌒  ⌒ヾ   /
              ('⌒ ; ⌒   ::⌒  )
             (´     )     ::: ) /
          ☆─ (´⌒;:    ::⌒`) :;  )
             (⌒::   ::     ::⌒ )

Name: Anonymous 2009-01-15 7:28

I use watcom

Name: Anonymous 2009-01-15 8:36

void Item :: getData(int a1, float b1)
void putData(void);
cout<<"number: "<<number<<endl;

WHITESPACE NIGGER, DO YOU KNOW WHEN TO USE IT

Also I raged at (void), implicit private, iostream, get/set.

Name: Anonymous 2009-01-15 8:42

>>24
you raged at implicit private?  are you gay?

Name: Anonymous 2009-01-15 12:26

>>24
 ONE WORED
FORCED WHITESPACE BEFORE CODE
 THREAD OVER

Name: Anonymous 2009-01-15 16:50

>>24
Posting in agreement with this anon.

Name: Anonymous 2009-01-15 17:17

VIM + Gepples

Name: Anonymous 2009-01-17 20:25

Of course VC++ is fucked... It creates it's own keywords.

Good luck trying to compile anything with the name "event" or "reg" in VC++.

Name: Anonymous 2009-01-17 21:50

TL;DR thread.
OP is a fucking cunt; don't blame the IDE for your own incompetence. This has nothing to do with IDE, compiler or whatever.

Name: Anonymous 2009-01-18 18:29

>>30
Thanks for summing that up, /b/.

Name: Anonymous 2010-10-02 19:00

C++ sucks and so does OOP

Name: Anonymous 2010-10-02 20:04

I just tried learned OO PHP. Fuckign worth it, makes it look so much goddamn cleaner. oh man, oh man, oh man.

OOP is great in my opinon, makes coding better to look at with class names and also when distributing your code so other devs can understand.

Name: Anonymous 2010-10-02 20:48

ASEX

Name: Anonymous 2010-10-02 20:56

>>33
You lie!

Name: Anonymous 2010-10-03 0:02

>>33
lol

Name: Anonymous 2010-10-07 15:15

Is it bad that i use Visual C++ as a C compiler?

Name: Anonymous 2010-10-07 15:46

Is is bad that I bump old threads?

Name: VIPPER 2010-10-07 16:41

I JEW-JEW-JEWS you!

Name: Anonymous 2010-12-09 18:31

Name: Anonymous 2010-12-21 14:24

Name: Anonymous 2011-03-02 21:34

I AM THE MOST FUCKING NGGER MATURE

Name: Anonymous 2012-06-03 8:05

44 GET

Name: Anonymous 2012-06-03 8:39

`>>forgots }
niggers
>>44
nice dubz bro

Name: Anonymous 2012-06-03 13:59

incapable of writing code
blames the compiler

Don't change these.
Name: Email:
Entire Thread Thread List