473,326 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

how can I get the call __PRETTY_FUNCTION__ runing?

Hello im using Visual Studio .net

And have troubel with the following line

ClassA::~ClassA()
{
cerr<<__PRETTY_FUNCTION__<<"\n"; \\this works with g++
}

on compiling I get this back:
filename.cc(20): error C2065: '__PRETTY_FUNCTION__' : undeclared identifier

does exist an library to add or have I just missed an command?
Thanks for your Help!
Jul 19 '05 #1
2 6778
Thomas wrote:
Hello im using Visual Studio .net

And have troubel with the following line

ClassA::~ClassA()
{
cerr<<__PRETTY_FUNCTION__<<"\n"; \\this works with g++
}

on compiling I get this back:
filename.cc(20): error C2065: '__PRETTY_FUNCTION__' : undeclared
identifier

does exist an library to add or have I just missed an command?
Thanks for your Help!


You have missed the fact that __PRETTY_FUNCTION__ is not part of
standard C++ and thus may not be available on every compiler.

Jul 19 '05 #2
> Hello im using Visual Studio .net

And have troubel with the following line

ClassA::~ClassA()
{
cerr<<__PRETTY_FUNCTION__<<"\n"; \\this works with g++
}

on compiling I get this back:
filename.cc(20): error C2065: '__PRETTY_FUNCTION__' : undeclared identifier
does exist an library to add or have I just missed an command?


__PRETTY_FUNCTION__ is not part of standard C++ but a g++ specific
extension. Consequently you cannot expect every compiler to support
this. If you are satisfied with just file name and line number you might
use a macro like this:

#define PRETTY_FUNCTION __FILE__":" << __LINE__

The predefined macro __FILE__ and __LINE__ are defined in the C++
standard, and should be available on any reasonable compilant C++
compiler. Note that this macro is not an exact equivalent for the
__PRETTY_FUNCTION__ macro; it only works for stream output. With a bit
more effort it can be modified to produce a string.

--
Peter van Merkerk
peter.van.merkerk(at)dse.nl


Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rakesh | last post by:
Hey, I am using delegates for asynchoronus communication. Its internally use threads from thread pool. I want to know whether this thread pool is on Application level or System level? If...
3
by: dahuzizyd | last post by:
Hi all I want to judge an application is runing or not when another application start . If the application is running , get focus. I use the Pinvoke to invoke the FindWindow function ,I...
3
by: msnews.microsoft.com | last post by:
Hi i am using User32.dll in Visual stdio 2005. public static extern long SetActiveWindow(long hwnd); public static extern long keybd_event(byte bVk, byte bScan, long dwFlags,
1
by: Joey | last post by:
I am using the below code to run a dos based program. While it is running you can hit ctrl-c to cancel the process. Does anyone know how I can send the same keystroke to the already runing...
5
by: PengYu.UT | last post by:
Hi, I want to print out error message from all the three macros __FILE__, __LINE__, __PRETTY_FUNCTION__. I'm wondering if there is one macro which serves equivalently as the combinations of the...
5
by: mastar | last post by:
Hi all im trying to run a file localy on my server (2003) using asp , this is the code : <%@ LANGUAGE = "JAVASCRIPT" %> <% var commandLine = "File_NAME.EXE"; var WshShell =...
2
by: atiq | last post by:
why isn't my Access giving me warning before runing the delete, append or update query because usually it warns you that you are about to append, update or delete the following number of records. It...
0
by: smugcool | last post by:
hi, I have made a project on vb 6.0. And i have made a setup file for the same. When i am runing this file in WINDOWS XP, its running absolutly fine. But the same setup file when i try to run...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.