LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-15-2006, 07:14 AM   #16
itz2000
Member
 
Registered: Jul 2005
Distribution: Fedora fc4, fc7, Mandrake 10.1, mandriva06, suse 9.1, Slackware 10.2, 11.0, 12.0,1,2 (Current)]
Posts: 732

Rep: Reputation: 30

Quote:
Originally Posted by dmail
http://www.linuxquestions.org/questi...00#post2502100

What confused me in your post is "double pointer ** to array"
Which I would see as int***
check it to compile it with VS as well... I'm pretty sure it will compile there.
Code:
#include <iostream>
using namespace std;


int main()
{
        int nNum;
        cout << "Enter a number" << endl;
        cin >> nNum;
        int **myArr = new int*[nNum];
}
 
Old 11-15-2006, 02:39 PM   #17
mtndew
LQ Newbie
 
Registered: Jan 2006
Distribution: Fedora Core 5
Posts: 13

Original Poster
Rep: Reputation: 0
The pointer method is what I would normally use:

Code:
int * random_array = new int[n];
But for the assignment we were told not to use pointers, I was just interested in knowing why I had points taken off.

It is interesting to know that the C99 standard allows it, however, since I learned C first.

Thanks guys, you answered my question.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
variable sized structures rajesh_b Programming 6 08-20-2006 10:56 PM
Pen-sized Linux Emerson General 4 07-24-2005 02:59 PM
Raid 5 Array with Different Sized Disks Dewar Linux - Hardware 1 11-19-2004 10:09 PM
over sized desktop with specific resolution N_A_J_M Linux - General 5 01-09-2004 10:35 PM
I need compact-sized sendmail. gandhar Linux - Networking 1 06-26-2003 06:16 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration