-
July 6th, 2002, 12:47 PM
#1
c++ newbie
ok guys, im new to programming in c++, and im goofing around just trying to learn it while its slow at work on a sat afternoon...
my problem is, ive written a little program that is trying to multiply 2 numbers together using a little function ive made just to learn how to do that stuff..
and when i try to compile it, it gives me an error of
'implicit declaration of function "int imultiply(...)"'
and i would also like to mention that im doin the programming on a sunOS server that im telnetting into...
the command line looks like this when i goto compile
altair$ c++ math.c
any help would be mucho appreciated!!!!
Duct tape is like the Force. It has a light side and a dark side, and it holds the universe together.
[geek code]
v3.12
GCS
d- s: a-- C++>$ US>$ UL>$ P+ L+ E--- W++>$ N K- w O---- PS PE Y+ t+ 5++ X R tv+ b+ DI+ D+ G e h-- r+ y++
[/geek code]
-
July 6th, 2002, 01:45 PM
#2
Avatar Goes Here
First of all, I would recommend getting a compiler on your machine, all the unix based compilers that I have used are very limited and are very hard to learn to use.
Second of all, please post your code so that I may pick it to find the error.
:::Asus A8N-Sli Premium:::AMD 3500+ @ 2.4ghz:::2x80GB 8mb cache RAID0 Array:::GeForce 7800GTX OC:::2GB Corsair XMS Memory:::500 Watt Enermax Liberty PSU:::16x Lite-on DVDRW:::
Counter Strike Source Forum and Server @ http://www.nvpclan.com -=Ninjas Vs. Pirates=-
-
July 8th, 2002, 10:44 AM
#3
here ya go R.D.
like i said.. nothing major.. just something simple so that i can learn what im doing
</font><blockquote><font size="1" face="Trebuchet MS, Verdana, Arial, Helvetica, sans-serif">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">
#include <iostream.h>
#include <stdio.h>
int mult;
int mult2;
//int result;
int main()
{
cout << "Please enter a number:";
cin >> mult;
cout << "Please enter a second number:";
cin >> mult2;
// Imultiply(mult,mult2);
cout << "the result is: " << Imultiply(mult, mult2);
return 0;
}
/* int Imulitply(int x, int y)
{
int result = x * y;
return result;
}
*/ </pre><hr /></blockquote><font size="2" face="Trebuchet MS, Verdana, Arial, Helvetica, sans-serif">
Duct tape is like the Force. It has a light side and a dark side, and it holds the universe together.
[geek code]
v3.12
GCS
d- s: a-- C++>$ US>$ UL>$ P+ L+ E--- W++>$ N K- w O---- PS PE Y+ t+ 5++ X R tv+ b+ DI+ D+ G e h-- r+ y++
[/geek code]
-
July 8th, 2002, 11:42 AM
#4
Registered User
Aside for the Imultiply function being commented out, all I see wrong is that the function is misspelled Imulitply instead of Imultiply. That could be your issue.
-
July 8th, 2002, 12:13 PM
#5
nope.. figgered out what the prob is..
wasnt declaring the function up in the code under the #includes....
did that and it compiled fine..
thanx for all the help guys
Duct tape is like the Force. It has a light side and a dark side, and it holds the universe together.
[geek code]
v3.12
GCS
d- s: a-- C++>$ US>$ UL>$ P+ L+ E--- W++>$ N K- w O---- PS PE Y+ t+ 5++ X R tv+ b+ DI+ D+ G e h-- r+ y++
[/geek code]
-
July 9th, 2002, 07:36 AM
#6
Registered User
Oh yea, that would cause a problem. My bad for not seeing it...
-
July 9th, 2002, 09:34 AM
#7
Avatar Goes Here
Glad ya got it figured out, I was away for a few days visiting my parents.
:::Asus A8N-Sli Premium:::AMD 3500+ @ 2.4ghz:::2x80GB 8mb cache RAID0 Array:::GeForce 7800GTX OC:::2GB Corsair XMS Memory:::500 Watt Enermax Liberty PSU:::16x Lite-on DVDRW:::
Counter Strike Source Forum and Server @ http://www.nvpclan.com -=Ninjas Vs. Pirates=-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Bookmarks