473,394 Members | 1,831 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,394 software developers and data experts.

Please help beginner

static const char assertFileName[] = __FILE__;

Assert();

This is normally found in applications, what does this mean ?
Thanks in advance.
Nov 14 '05 #1
2 1017
On Thu, 16 Sep 2004 17:03:29 -0700, Wong wrote:
static const char assertFileName[] = __FILE__;

Assert();

This is normally found in applications, what does this mean ?
Thanks in advance.


Assuming you mean the standard assert function (all lowercase), it is
used for debugging purposes to print information about where the
tested condition failed and abort the program if a condition that should
never fail does. More information here:
http://members.aol.com/wantondeb/#ASSERT and of course in the standard.
You need to include assert.h as well.

I suggest you get a good C reference or learn how to use google.

Rob Gamble
Nov 14 '05 #2

"Wong" <ta*********@yahoo.com> wrote
static const char assertFileName[] = __FILE__;

Assert();

This is normally found in applications, what does this mean ?

static - if global, variable visible in this file only.
- if in a function, hold in permanent storage (do not destroy when
function returns).

const - the variable is read-only.

char - the variable is of character type.

assertFileName - call the variable "assertFileName"

[] - it is an array of unspecified size (big enough to hold initialiser).

= - initialise it.

__FILE__ - a special symbol which the compiler expands to the name of the
current file.

; - C statement terminator.
Assert().

Look up the stdlib function "assert()". Often you will find that in real
code people do not use the assert() provided, but a similar function with a
similar name. Capitalising the first letter is a common way of doing this.
Nov 14 '05 #3

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

Similar topics

5
by: Thomas G. Marshall | last post by:
This message is sent to these newsgroups because they are no longer valid: comp.lang.java comp.lang.java.api comp.lang.java.bugs comp.lang.java.misc comp.lang.java.setup comp.lang.java.tech ...
8
by: Grrrbau | last post by:
I'm a beginner. I'm looking for a good C++ book. Someone told me about Lafore's "Object-Oriented Programming in C++". What do you think? Grrrbau
16
by: ranger | last post by:
Hi, I'm a beginner with C++, studying on my own from a book and I've encoutered quite some problems.. If possible, someone out there might help me out.. The problem is the following.. I've...
4
by: BOOGIEMAN | last post by:
Is there any REALLY good book for Absolute C# Beginner ? I intend to work in Visual C# .NET 2003, any recomandation will help Thanks
3
by: Cristina | last post by:
I get the following error: Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
118
by: 63q2o4i02 | last post by:
Hi, I've been thinking about Python vs. Lisp. I've been learning Python the past few months and like it very much. A few years ago I had an AI class where we had to use Lisp, and I absolutely...
9
by: Synapse Syndrome | last post by:
Hi I've been given what I am told is a PHP script to be used on my server. I do not know any PHP. I am trying to use a feature of a program called ArchiCAD. This feauture allows CAD drawing...
20
by: C# Beginner | last post by:
I'm currently creating a database class, which contains a member called Open(). With this method users can open different databases. When a user tries to open a database which happens to be secured...
5
by: macca | last post by:
Hi, I'm looking for a good book on PHP design patterns for a OOP beginner - Reccommendations please? Thanks Paul
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.