Also do tel me what is the process of creating functions in seperate files and referencing them under a single file.
I use a dev-C++ for my coding
Also do tel me what is the process of creating functions in seperate files and referencing them under a single file.
I use a dev-C++ for my coding
Hi
I am just in the process of learning C++. I was trying this program that displays arrays using a pointer.
#include<iostream.h>
int getarray();
int display(int*,int,int);
int a[4][4];
main(void){
//getarray();
int a[4][4]={1,2,3,4,5,6,7,8,9,0,1,2};
display(a,4,4);
cin.get();
}
int getarray(){
int a[4][4]={1,2,3,4,5,6,7,8,9,0,1,2};
}
void display(int (*a)[4],int rows,int column){
int p;
for (int i=0;i<rows;i++){
p=a+i;
for(int j=0;j<column;j++){
cout<<" "<<*(a+j)<<" ";
}
cout<<'\n';
}
cout<<'\n';
}
But then I always get a error that there is a "invalid conversion from int(*)[4] to int".
What does it mean, How do i solve it? Do put your response
1. Read all the copious introductions on how to use [code]
[/code] tags.
2. Make these the same
int display(int*,int,int);
void display(int (*a)[4],int rows,int column)
3. #include<iostream.h>
Does your compiler warn about deprecated headers?
1. have i made a mistake in declaring some tags?
2.How do I get to make the two same?
3. No there is no warning like that.
Thanks for your time
> 1. have i made a mistake in declaring some tags?
Isn't that what I just said?
> 2.How do I get to make the two same?
ctrl-c and ctrl-v ?
> 3. No there is no warning like that.
Did you get the latest version?
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.