Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I automaticly create variables without declaring pointers?

Status
Not open for further replies.

wshun

Programmer
Oct 20, 2000
1
IT
Dear all,

I started programming and I am facing this problem a long time?

Example: Auto creating variables.
//-------------------------------
int i = 1;
int j = 1;
int x;
while ( j < 100 )
{
x = 234;
i++
};
//-------------------------------

&quot;int x;&quot; is not right.

I hope you have the answer.
Thanks [sig][/sig]
 
Hi,
You have my interest... what exactly are you trying to accomplish? Linked lists are commonly used to create a dynamic number of value holding structures at runtime. The &quot;New&quot; keyword plays an important role here. However, you have to use pointers in a linked list. [sig]<p>Rob Marriott<br><a href=mailto:rob@career-connections.net>rob@career-connections.net</a><br>[/sig]
 
Have you really written the while statement correctly.
You shouldn't finish the &quot;}&quot; with a &quot;;&quot; and you haven't written any &quot;;&quot; behind the &quot;i++&quot; [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top