返回一个值。 [英] Returning a value.

查看:64
本文介绍了返回一个值。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将结构的指针值从一个函数返回到main;但每当它进入main时它变为NULL ...我在main中使用了另一个指针并将其值等同于返回指针但它仍然变为NULL。我也尝试从main中删除它的初始化;但是ivvain。

那么,保留其价值的是什么呢?其实我想在其他功能中使用相同的值; m从main调用。

I m returning a value of pointer of a structure from one function to main; but whenever it comes in main it becomes NULL... i used another pointer in main and equated its value to returning pointer but its still becoming NULL. I also tried removing its initialization from main; but ivvain.
So, what is to be donr to retain its value? Actually i want to use the same value in other function; which m calling from main.

推荐答案

这是代码供参考!

Here is the code for reference!

展开 | 选择 | Wrap | 行号


亲爱的Parul ...


请指定从哪个函数返回指向main的指针。


Rgds

Jack Aegan
Dear Parul...

Please specify the from which function you are returning the pointer to main.

Rgds
Jack Aegan


来自struct dl merge(struct dl * p)函数。
From struct dl merge(struct dl *p)function.


这篇关于返回一个值。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆