how to specify power of number



Hi, I'm new to c, so please excuse, if this is silly ;-)

I made a C function, which takes IP adress from string and converts to unsigned long int. Everything
works, but I found that the "counting" part part works only with this:

numericip=atoi(textip[0])*256*256*256+atoi(textip[1])*256*256+atoi(textip[2])*256+atoi(textip[3]);

When I wrote *(256^3), I got fake results. I'd like to use something more sophisticated, instead of 256*256
*256, which does look silly ;-) (Just curious, what if I'd ever need to make 100th power of 256 ;-) )

Thank you in advance.
.



Relevant Pages

  • Re: sending an email to a user supplied adress
    ... string with at least one period in it. ... exploits related to your mail program. ... Check for string length, invalid ... it then takes that adress and gives it to a commandline email ...
    (comp.security.misc)
  • Re: newbie: malloc and free
    ... interface is no excuse for you to be a bad netizen. ... > because you are trying to free a memory (string) that is on the stack; ...
    (comp.lang.c)
  • Re: Send email throught VB.NET 2005
    ... Private _Subject As String ... Public Property Adress() As String ... Public Property SubjectAs String ...
    (microsoft.public.dotnet.languages.vb)
  • RE: Transforming adresses into full text
    ... By any chance you have used the string ... dim cleanupstr as string ... > I would like to make a macro doing this: detecting each adress, ... > doc, copying it into the clipboard, closing the document, then pasting the ...
    (microsoft.public.word.vba.general)
  • Re: Populate an arraylist....
    ... public String processMyFile() throws IOException { ... how can i modify my code to load txt file into the object headline and ... Excuse me for disturb,please help me with code if it's ...
    (comp.lang.java.programmer)