473,394 Members | 1,951 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.

How to access **pointer from structure

Hi,

I want to access ** pointer from pointer to structure. Pls guide me in the code given below:

sturct m
{
int i;
struct n ** pCurrLine; // Ram pointer
struct m *prev;
struct m *nxt;

};

struct n
{
int x[10];
struct n *pre;
struct n *nxt;
};


*pcurrline = &pLine_cur_ptr;
struct n *pLine_cur_ptr;
pLine_cur_ptr = &cur_Line;

struct m *mCurr;

Now if I have to access pCurrLine then how should I proceed.

I tried :

mCurr->pCurrLine = mCurr->pCurrLine->pre ; // error

mCurr = mCurr->pre; /// Is right


pls help

Thanks,
Aug 21 '08 #1
2 1356
newb16
687 512MB
*pcurrline = &pLine_cur_ptr;
if pcurrline is not initialized ( points nowhere ) you will write
this pointer somewhere in ram. It is not good.

I tried :

mCurr->pCurrLine = mCurr->pCurrLine->pre ; // error
mCurr->pCurrLine is a pointer to pointer, so you need something like
(*(mCurr->pCurrLine))->pre
Aug 21 '08 #2
if pcurrline is not initialized ( points nowhere ) you will write
this pointer somewhere in ram. It is not good.


mCurr->pCurrLine is a pointer to pointer, so you need something like
(*(mCurr->pCurrLine))->pre


Thank you...I worked according to your suggestion. I am also type casting the ROm pointer into RAM so its working at this stage...lets see
Once again Thanks...I appreciate your help.
Aug 21 '08 #3

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

Similar topics

5
by: Claudio Grondi | last post by:
Background information: --------------------------------- in order to monitor mainboard sensory data as fan speeds, temperatures, applications like SpeedFan http://www.almico.com/speedfan.php or...
3
by: Random Person | last post by:
Does anyone know how to use VBA to relink tables between two MS Access databases? We have two databases, one with VBA code and the other with data tables. The tables are referenced by linked...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
6
by: Fernan Bolando | last post by:
What is the best way of passing a structure to a function currently I do by it passing a pointer to the structe. sample code below int main() { struct sample_struct a_struct, *point_struct;...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
6
by: Urs Thuermann | last post by:
With offsetof() I can get the offset of a member in a struct. AFAICS, it is portable and clean to use this offset to access that member. I need to do something like this struct foo { struct...
6
by: noone | last post by:
What is the syntax to access members of a structure without explicitly naming the structure in every access? struct mytype { int a; char* b; long c; } IT; How can I access the structure...
5
by: Mahendra Kumar Kutare | last post by:
I am trying to implement a webserver with boss-worker model thread pool implementation - I have a header declaration threadpool.h as - typedef struct threadpool_work { void (*routine) ();...
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
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.