News:

Wieners, Brats, Franks, we've got 'em all.

Main Menu

[RECOMMENDATION] C Book

Started by deadly7, November 04, 2005, 12:12:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

deadly7

Quote from: Warriorx86] link=topic=3579.msg36641#msg36641 date=1131144338]
Go to your local library, mine has tons of programming books.
The one down the block from me has a pretty poor selection of programming books, but the one on the rich side of town has tons of em.
[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
[17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine

MyndFyre

Quote from: iago on November 04, 2005, 05:53:31 PM
You shouldn't use "true" in C, it's not standard.  TRUE is better. 
Of course that's C++.

Quote from: Joe[e2] on November 04, 2005, 05:52:43 PM
MyndFyre, I'm sure you're well aware that you need to create an eBook class. =)
Which I already had, otherwise I would have had a plethora of other errors during compilation.


int main(void);
bool like(const book* );

class book {
public:
void buy(void) { }
void trash(void) { }
};

bool like(const book* pbook) {
return true;
}

int main()
{
book eBook;

if ( like(&eBook) == true ) {
eBook.buy;
} else {
eBook.trash;
}

return 0;
}


(There is some other stuff there, because whenever I have to compile C/++ for forum posting I check it.

c:\Documents and Settings\robp.MINNOW\My Documents\Visual Studio Projects\Testbed\Testbed\Testbed.cpp(27) : warning C4551: function call missing argument list
c:\Documents and Settings\robp.MINNOW\My Documents\Visual Studio Projects\Testbed\Testbed\Testbed.cpp(29) : warning C4551: function call missing argument list
Quote from: Joe on January 23, 2011, 11:47:54 PM
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Quote from: Rule on May 26, 2009, 02:02:12 PMOur species really annoys me.

iago

You not only checked it on a different operating system, you checked it on a different compiler.  If you want to check somebody's code, you ought to at least use the same technology they're using :-P

MyndFyre

Quote from: iago on November 04, 2005, 06:51:55 PM
You not only checked it on a different operating system, you checked it on a different compiler.  If you want to check somebody's code, you ought to at least use the same technology they're using :-P
I'll refer you to ISO/IEC 9899:TC2 section 6.5.2.2: Function Calls.  Specifically:
Quote
1 The expression that denotes the called function78) shall have type pointer to function
returning void or returning an object type other than an array type.
(Subscript 78):
QuoteMost often, this is the result of converting an identifier that is a function designator.
Also:
QuoteA postfix expression followed by parentheses () containing a possibly empty, comma-separated
list of expressions is a function call. The postfix expression denotes the called
function. The list of expressions specifies the arguments to the function.

Joe's semantics would simply be a statement of a function-pointer expression, not an actual call to the function.  In any C you need to affix the postfix operator () to make it a valid function call.
Quote from: Joe on January 23, 2011, 11:47:54 PM
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Quote from: Rule on May 26, 2009, 02:02:12 PMOur species really annoys me.

iago

You're right, it IS wrong if you assume those are functions, but I meant in general :-P

I assumed those were variables, in which case, I don't think it'll have any warnings.  Of course, it won't do anything either..

MyndFyre

Quote from: iago on November 04, 2005, 07:50:50 PM
I assumed those were variables, in which case, I don't think it'll have any warnings.  Of course, it won't do anything either..
That would be silly; buy and trash are verbs.  They should be functions.  :P
Quote from: Joe on January 23, 2011, 11:47:54 PM
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Quote from: Rule on May 26, 2009, 02:02:12 PMOur species really annoys me.

Joe

Its neither C nor C++. Its pseudo-C. You lose.

On a side note, I'd prefer a physical book too, asuming I had a million dollars (those things are not cheap, and I am broke), and a rocket (it takes a while to get to the store, whereas I can download a book in about a half hour (for big ones)).
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


MyndFyre

Quote from: Joe[e2] on November 04, 2005, 08:34:30 PM
Its neither C nor C++. Its pseudo-C. You lose.

On a side note, I'd prefer a physical book too, asuming I had a million dollars (those things are not cheap, and I am broke), and a rocket (it takes a while to get to the store, whereas I can download a book in about a half hour (for big ones)).
What, do you live in a city of 5 people that doesn't have a bookstore?  No wonder you use dial-up.
Quote from: Joe on January 23, 2011, 11:47:54 PM
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Quote from: Rule on May 26, 2009, 02:02:12 PMOur species really annoys me.

Eric

Quote from: Joe[e2] on November 04, 2005, 08:34:30 PM
Its neither C nor C++. Its pseudo-C. You lose.

On a side note, I'd prefer a physical book too, asuming I had a million dollars (those things are not cheap, and I am broke), and a rocket (it takes a while to get to the store, whereas I can download a book in about a half hour (for big ones)).

Buy them used... they're just books and Amazon owns any walk-in bookstore.

Sidoh

I also perfer physical books, I find myself keeping my attention more easily when I'm reading something that's inked on paper as opposed to illuminated on my screen. :)

deadly7

Quote from: Sidoh on November 04, 2005, 10:12:06 PM
I also perfer physical books, I find myself keeping my attention more easily when I'm reading something that's inked on paper as opposed to illuminated on my screen. :)
Not to mention it's MUCH easier on the eyes, and you can sit with your legs kicked back and a lemonade in your other hand.
[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
[17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine

Warrior

You don't have a desk..? I eat, sleep, and shower @ my computer.
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

iago

My neck gets sore if I'm in any of my office chairs for a long time (read: more than an hour or two).  I like having a recliner. 

Books aren't realy that expensive.  I've never paid more than cad$100 for a good one, including shipping. 

rabbit


deadly7

Note to the majority of this forum: We don't make good money working with our government to think $84 is nothing.
[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
[17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine