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

this pointer passing null incase of refrence

hi,

following my code snippet

Expand|Select|Wrap|Line Numbers
  1. void
  2. ObAuthUser::SetInstanceFromToken(ObKeyValMap const & rKeyValMap)
  3. {
  4.  
  5.     char const * pAuthId = rKeyValMap.GetVal(kAuthIdKey); 
  6. }
  7.  
following the stack trace

ObKeyValMap::Lookup (this=0x0, key=0x7901ba2 "AuthId")
ObKeyValMap::GetVal (this=0x0, key=0x7901ba2 "AuthId")
ObAuthUser::SetInstanceFromToken (this=0xb7ff3cc4,
@ rKeyValMap=@0xbfffd1e4)


I am wondering why this pointer is getting null in getval function.
Actually i am using g++ 3.3.2 in linux environment and this issue reproduce not every time.

is there any issue with g++ 3.3.2 for reference passing?

Please reply as soon as possible.
Aug 1 '07 #1
1 1443
weaknessforcats
9,208 Expert Mod 8TB
It looks like a compiler bug.

Regardless of calling by pointer vs reference, the this pointer is always the first argument of a member function.
Aug 1 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

110
by: Mr A | last post by:
Hi! I've been thinking about passing parameteras using references instead of pointers in order to emphasize that the parameter must be an object. Exemple: void func(Objec& object); //object...
38
by: Radde | last post by:
HI all, Whats the difference b/w pass by ref and pass by pointer in C++ when ur passing objects as args.. Cheers..
3
by: Prabh | last post by:
Hello, I am wondering whats wrong with the following code. It is crashing on Linux, but works fine on AIX. The function basically get DbNm@Srvr string and then return DbNm and Srvr back to...
15
by: K.M Jr | last post by:
Hi group, I want you to tell me if the following code is legal as per Standard. void foo(int *p) { } int main(void)
2
moishy
by: moishy | last post by:
I have a problem when passing by refrence using FOREACH(): foreach ($array as &$value) {if ($value <= 0) {$value+=12;}} It should have worked,...
29
by: shuisheng | last post by:
Dear All, The problem of choosing pointer or reference is always confusing me. Would you please give me some suggestion on it. I appreciate your kind help. For example, I'd like to convert a...
30
by: Jess | last post by:
Hello, I tried a program as follows: include<iostream> using namespace std; class A{ public:
27
by: rocco.rossi | last post by:
I've been trying to write a function capable of checking if a pointer value is set to NULL, and if it isn't, of deallocating and setting it's value to NULL regardless of the pointer's type. I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.