You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

AP.Sakkthivel

Professional

  • "AP.Sakkthivel" is male
  • "AP.Sakkthivel" started this thread

Posts: 563

Location: India

Occupation: Application Development Using Qt

  • Send private message

1

Thursday, September 1st 2005, 6:52am

Memory Allocation Routines[Solved]

I have come across some of the materials from msdn

While using the following functions

they use :: as prefix

::HeapAlloc()
::MemoryCopy()

Why the prefix is needed?
what it is meant?

Thanks in Advance
Regards
- $akthi

You never know, how soon it may be too late…

This post has been edited 1 times, last edit by "AP.Sakkthivel" (Sep 13th 2005, 6:06am)


  • "wysota" is male

Posts: 4,276

Location: Warsaw, POLAND

  • Send private message

2

Thursday, September 1st 2005, 7:07am

RE: Memory Allocation Routines

It means you're using the default namespace. It is to avoid name clashes. Imagine there could be a class with a MemoryCopy() member. If you called MemoryCopy(), the compiler would use the member of your class instead of the global function. If you prepend the call with "::", then the default function will be called instead of the class member.

AP.Sakkthivel

Professional

  • "AP.Sakkthivel" is male
  • "AP.Sakkthivel" started this thread

Posts: 563

Location: India

Occupation: Application Development Using Qt

  • Send private message

3

Thursday, September 1st 2005, 8:27am

RE: Memory Allocation Routines

Thanks!
I Understand
Regards
- $akthi

You never know, how soon it may be too late…