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

Why wont this compile?

Name: Anonymous 2007-04-12 8:54 ID:/L93LvWT

#include <ctime>
using namespace std;
int main()
{
    //Array processing
    int info[5][2];     //Array with 10 elements
    int amt, amto, amtt, amtr, amtv;
    int x=0;          //counter
    int y;            //number of elements in array
    int value=0;      //input value
    int total=0;      //total
    float average;    //average
    int stop=0;
   
    cout<<"\nThis program will calculate the average of up to 10 numbers\n";
    while(value!=-1)
    {
            cout<<"Enter sales ID number: ";
            cin>>value;
            if (value=1)
            {
              cout<<"Enter sales amount: ";
              cin>>amto;
            )
            else if (value=2)
            {
              cout<<"Enter sales amount: ";
              cin>>amtt;
            )
            else if (value=3)
            {
              cout<<"Enter sales amount: ";
              cin>>amtr;
            )
            else if (value=4)
            {
              cout<<"Enter sales amount: ";
              cin>>amtf;
            )
            else if (value=5)
            {
              cout<<"Enter sales amount: ";
              cin>>amtv;
            }
            }

There's more stuff after it, but this is what's important.

I keep getting these errors.
"27 expected primary-expression before ')' token "
"27 expected `;' before ')' token "

Can anyone help me!?

Name: Anonymous 2007-04-13 17:30 ID:WETqBq8R

s/Pointless/Point-free/ plox

Name: Anonymous 2007-04-13 17:35 ID:Heaven

>>41
I think you should die.

Name: Anonymous 2007-04-13 17:55 ID:Heaven

>>41
If it weren't for the fact that your ID starts with WET your post would be completely pointless.

Name: Anonymous 2007-04-13 18:07 ID:lUVVwEoC

That's what happen when you don't learn C and learn C++, you look retarded like >>1,13,18,23 they use C++ because they are too retarded to understand pointers correctly and most of them know less about OO than C programmers. The only reason why they want to learn C++ is BECAUSE THBT THAT HL2 WAS CODED IN C++ SO THEY DON'T KNOW A SHIT ABOUT PROGRAMMING BUT THEY WANT TO LEARN C++ BECAUSE THEY WANT TO BE A 1337 GAEM PROGRAMMERZZ AND THEN THEY EXPECT TO BE ABLE TO CODE HL3 AND THEN THEY ARE TOLD THAT C++ IS A SUPERSET OF C SO THEY THINK THAT C IS OLD AND USELESS TO LEARN EVEN THOUGH IT'S BETTER TO LEARN C TO UNDERSTAND POINTERS AND HOW TO NOT CODE LIKE A RETARDED DUDE AND UNDERSTAND WHY SOME THINGS ARE "CONSIDERED HARMFUL" BUT BECAUSE THEY LEARN C++ THEY DON'T UNDERSTAND SOME THINGS AND AFTER THEY HAVE LEARNED HOW TO USE cout AND cin THEY THINK THEY KNOW EVERYTHING BUT WHEN THEY WILL BE TALKING WITH NOT RETARDED C++ PROGRAMMERS THEY WILL GET FLAMED BECAUSE THEY PRETEND TO PROGRAM IN C++ EVEN THOUGH THEY DON'T KNOW A SHIT ABOUT OO.

That's exactly what a C++ programmer looks like http://dis.4chan.org/read/prog/1171073076

Name: Anonymous 2007-04-13 21:10 ID:t9NZtfrS

>>44
Wow, that's quite a broad generalization for a language with such a large developer base. And honestly, you're not special for understanding pointers. We all know you just learned about pointers last week but please, shut your mouth about it.

Do you care to point out how I, >>18, am wrong and you are so very right? Did I hurt your feelings?

What's funny with your post is that most C programmers I know are just too damn lazy to learn anything -beyond- C. They just picked out the thinnest programming book at the store that they could find, read it a few times and spend the rest of their time telling programmers of other languages how great they are in comparison and jerking eachother off in their respective forums.

Name: Anonymous 2007-04-13 21:56 ID:lUVVwEoC

DEAR >>45, DID I HURT YOUR FEELINGS ?!!?!?!!1611ONEONEONESIXSIXONE
 
I THINK YOU DON'T UNDERSTAND THAT I WAS TROLLING.

What's funny with your post is that most C programmers I know are just too damn lazy to learn anything -beyond- C.
WHAT'S FUNNY WITH YOUR POST IS THAT MOST C++ PROGRAMMERS I KNOW ARE JUST TOO DAMN LAZY TO LEARN ANYTHING -BEYOND- cout AND cin.

Time to stop trolling now.

First of all even if it looked like I was generalizing, I was not. But theres a lot of people who program in C++ because they know that lots of games have been programmed in C++ and they pretend to program in C++ even though the only thing they know is cout and cin without any clue about what OO is and they don't stop talking shit about "THEIR NEXT MMORPG" I was talking about them. I know that most of C++ programmers are competant etc.

We all know you just learned about pointers last week but please, shut your mouth about it.
No, sir. BTW, I trolled about that because you said :
This isn't even mentioning how you C fags reinvent the wheel everytime you pass a structure pointer to a function, forgetting that classes in C++ could easily do that job for you and take away the unnecessary micro-management.
If you call that reinventing the wheel there's a problem, BTW WELCOME TO PROCEDURAL PROGRAMMING WHERE METHODS DON'T EXIST, SIR. IT'S AN OLD AND DIFFERENT WAY TO PROGRAM GET USED TO IT.
They just picked out the thinnest programming book at the store that they could find, read it a few times and spend the rest of their time telling programmers of other languages how great they are in comparison and jerking eachother off in their respective forums.
SAME THING WITH C++ PROGRAMMERS SIR
and that's because C programmers like to troll.

What's funny with your post is that most C programmers I know are just too damn lazy to learn anything -beyond- C.
It hurted my feelings, seriously, don't you think it's the same with C++ programmers ?
I didn't say that I don't program in C++ and I don't think I lack of knowledge in programming because I learned a lot "beyond" C

I still think what I said when I wrote >>44 but I explained my point this time.

Name: Anonymous 2007-04-13 23:22 ID:ZABjT4TH

>>18,45
HEY GUYS I CAN'T EVEN WRITE VALID C CODE BUT I WILL GLADLY LECTURE YOU ON WHY C IS INFERIOR

Name: Anonymous 2007-04-13 23:46 ID:lUVVwEoC

>>47
win

Name: Anonymous 2007-04-13 23:58 ID:t9NZtfrS

>>47
I believe you're pointing out my polymorphism example? Of course it wouldn't compile, that's the point you stupid nigger.

Name: Anonymous 2007-04-14 0:03 ID:K1dwZ0tN

>>49
WORDS

Name: Anonymous 2007-04-14 0:04 ID:K1dwZ0tN

btw my ID changed but I'm >>44,46

Name: Anonymous 2007-04-14 0:41 ID:oHN4f4iA

>>49
I TRIED TO USE MISMATCHING FUNCTION DECLARATIONS AND IT DIDN'T WORK THEREFORE C DOES NOT HAVE POLYMORPHISM

Name: Anonymous 2007-04-14 1:35 ID:ypZA+b2l

Could be that you need to get your vision checked.

Name: Anonymous 2007-04-14 1:41 ID:GGjiw6Q6

>>52
Uhm, fucking exactly? And it never will in any future revision due to the retarded rule that states you don't have to give a parameter list when defining a function.

Name: Anonymous 2007-04-14 4:29 ID:AWcLfLYl

The lack of polymorphism in C is the deal breaker for me. I'm fine with pointers and even manual memory management (though I don't approve of lowering myself to doing work that the computer should be doing for me) but writing a sort function for arrays of ints and then having to copypasta to have the same code work for floats is lame.

Name: Anonymous 2007-04-14 4:57 ID:4vxCuLuE

>>55

void *function()

problem solved fag

Name: Anonymous 2007-04-14 8:39 ID:AWcLfLYl

>>56
Then you have to cast the return value, and how is your program supposed to know what to cast it to? Fag.

Name: Anonymous 2007-04-14 8:47 ID:4vxCuLuE

>>57
...
Your program is obviously not supposed to know what to cast it to, it's your job.
OH HO, IT'S SO BORING TO WRITE (cast) EACH TIME I CALL THE FUNCTION

Name: Anonymous 2007-04-14 9:14 ID:AWcLfLYl

>>58
Right numbnuts, so when I write my sort function to take an additional argument f, a function to compare two items, how is sort() supposed to know the type of f() when the whole point is that it could be any type because we're trying to make the damn thing polymorphic?

Name: Anonymous 2007-04-14 9:38 ID:i91GP0cf

>>59

lrn2template

Name: Anonymous 2007-04-14 12:55 ID:CCHJWxso

Again proving that C programmers constantly reinvent what C++ programmers take for granted, albeit with ugly hacks.

As I said, if you're not developing a kernel or writing device drivers you have no real reason to use C.

Name: Anonymous 2007-04-14 12:58 ID:AWcLfLYl

>>60
C doesn't have templates.

>>61
What are you talking about you idiot.

Name: Anonymous 2007-04-14 13:00 ID:CCHJWxso

>>62
Take a look at the ugly "polymorphism" example in C using a function pointer a while ago, it's laughable.

And you can be sure that the C programmers will come up with some ugly "template" hack in C trying to prove you wrong.

Name: Anonymous 2007-04-14 13:03 ID:sTxSa6if

Is it possible to do something like writing an animal class and derive it to several other classes like bird, mammal, whatever and save all those classes in a container in c? Just wondering how you do that in c.

Name: Anonymous 2007-04-14 13:24 ID:K1dwZ0tN

>>64
WELCOME TO PROCEDURAL PROGRAMMING WHERE INHERITANCE DOESN'T EXIST, SIR. IT'S AN OLD AND DIFFERENT WAY TO PROGRAM GET USED TO IT.

Name: Anonymous 2007-04-14 13:42 ID:xEaotdBm

>>61
A low-level language like C or FORTRAN is also necessary for applications that need as much performance as they can get, such as scientific simulations to be run on large parallel computers.

Name: Anonymous 2007-04-14 13:43 ID:CCHJWxso

>>65
>WELCOME TO PROCEDURAL PROGRAMMING WHERE INHERITANCE DOESN'T EXIST, SIR. IT'S AN OLD AND DIFFERENT WAY TO PROGRAM KERNELS AND WRITE DEVICE DRIVERS GET USED TO IT. C WAS ONCE MADE TO BE A PORTABLE ASSEMBLY. ONE OF THE GOALS OF C++ WAS TO BE A BETTER C, LEARN C++ INSTEAD EVEN IF YOU AREN'T GOING TO USE THE ADDED FEATURES.
Fixed it for you.

Name: Anonymous 2007-04-14 13:46 ID:CCHJWxso

>>66
Read >>13

Name: Anonymous 2007-04-14 13:50 ID:HXvgnJr7

>>67
WELCOME TO PROCEDURAL PROGRAMMING WHERE INHERITANCE DOESN'T EXIST, SIR. IT'S AN OLD AND DIFFERENT WAY TO PROGRAM GET USED TO IT. C WAS ONCE MADE TO BE A PORTABLE ASSEMBLY. ONE OF THE GOALS OF C++ WAS TO TOTALLY MISUNDERSTAND THE CONCEPT OF OBJECT-ORIENTATION, BOLT IT ON TO C AND FOOL THOUSANDS OF IDIOTS INTO ACTUALLY USING IT, LEARN HASKELL INSTEAD.
Fixed some grammatical mistakes.

Name: Anonymous 2007-04-14 13:52 ID:K1dwZ0tN

>>67
It's funny to see how C++ fags think that C++ is superior to C and don't understand that a decent programmer should learn both

Name: Anonymous 2007-04-14 14:02 ID:CCHJWxso

>>70
It's funny how C programmers think everyone should learn C and give no fucking reason as to why.

Name: Anonymous 2007-04-14 14:08 ID:Heaven

>>71
Hi. I'm not a C programmer, I'm a Haskell fag. Everyone should learn C because it's really fucking widespread. If you do any nontrivial coding, you're deemed to come across some C code. If you don't know how to hack it, you're fucked.

Name: Anonymous 2007-04-14 14:17 ID:CK5pKzjY

You two are missing the point that both C and C++ are made of lose and fail. I challenge any of you faggots to implement y f = f (y f) in your retarded language.

Name: Anonymous 2007-04-14 14:23 ID:vdOUtjPl

>>40
Hai dumbass, I was merely proving they're optional. I would never go with out them, though.

Name: Anonymous 2007-04-14 14:28 ID:K1dwZ0tN

DEAR >>73, NO U

Name: Anonymous 2007-04-14 14:30 ID:vdOUtjPl

>>73
if I knew what the fuck y f = f (y f) was trying to accomplish I would.

Name: Anonymous 2007-04-14 14:35 ID:CK5pKzjY

>>76
It's called the Y combinator. Here I'll even give you the url: http://en.wikipedia.org/wiki/Fixed_point_combinator

Name: Anonymous 2007-04-14 14:41 ID:CCHJWxso

>>74
Optional but you could never use them outside the narrow scope of that example, so you fail.

Name: Anonymous 2007-04-14 14:43 ID:Op3SamSC

You're are missing the point that Haskell is made of lose and fail. I challenge any of you faggots to implement an operating system in that retarded language.

Now, now, fair is fair. :p

Name: Anonymous 2007-04-14 14:45 ID:HXvgnJr7

>>79
And who could you possibly be replying to?

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