Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 5th, 2006, 7:19 PM   #31
leo1502
Newbie
 
Join Date: Apr 2006
Posts: 16
Rep Power: 0 leo1502 is on a distinguished road
god forbid, I can't make it work using the last form.
I think it's not supposed to work that way.
leo1502 is offline   Reply With Quote
Old May 5th, 2006, 7:59 PM   #32
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 873
Rep Power: 4 The Dark is on a distinguished road
Quote:
Originally Posted by leo1502
You mean I should return a pointer and then do *SmartMax(x,y)=100 ?
If so, that's not what I wanted, I need the syntax to be SmartMax(x,y)=100

Or maybe I didn't follow you right, can you give an example then?

about the function idea, I need it to be a macro (that's the assignment's requirements)
In this case you would call it like:
SmartMax(x,y,100);
which is a lot more normal than assigning a value to the return of what looks like a function call.

If grumpy's syntax doesn't work for you, show the exact code you are using along with the output you get.

Edit: removed other suggestion as I just saw you need it to be a macro.
The Dark is offline   Reply With Quote
Old May 5th, 2006, 9:54 PM   #33
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,253
Rep Power: 5 grumpy will become famous soon enough
Quote:
Originally Posted by leo1502
god forbid, I can't make it work using the last form.
I think it's not supposed to work that way.
If that's what you think, you are incorrect. Either your code is doing something wrong, or you haven't defined the macro correctly.
grumpy is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:45 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC