User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
DaniWeb is a massive community of 402,568 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,293 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Showing results 1 to 5 of 5
Search took 0.01 seconds.
Posts Made By: Malaisary
Forum: C Oct 31st, 2007
Replies: 19
Views: 5,184
Posted By Malaisary
Question Re: Copy argv to string in C(newbie question)

I also want to read filename, but in addition I need to read some interger parameter. I used this, now want to change. How can I handle: ./progname infilename integer ?

int main(){
...
Forum: C++ Oct 30th, 2007
Replies: 6
Views: 877
Posted By Malaisary
Re: counting sort algorithm for 2 dim array

I have it working now. The only thing is hard for me, in step 4, it doesn't print all rows' values, only sorted column's values. I've tried to play with col instead of scol in B[][] and A[][], but it...
Forum: C++ Oct 30th, 2007
Replies: 6
Views: 877
Posted By Malaisary
Re: counting sort algorithm for 2 dim array

Hello,
I found that last loop has some problem, but couldn't figure out what exactly. I am trying this:

for (int i=0; i<rows; i++)
for (int j=0; j<col; j++){
B[C[A[i][col]]][col] =...
Forum: C++ Oct 28th, 2007
Replies: 6
Views: 877
Posted By Malaisary
Re: counting sort algorithm for 2 dim array

I am passing dynamically allocated arrays:

//create an array
int** ARR = new int*[data_rows];
int** A = new int*[data_rows];
int** B = new...
Forum: C++ Oct 28th, 2007
Replies: 6
Views: 877
Posted By Malaisary
Question counting sort algorithm for 2 dim array

Hello,
I want to sort a 2dim array by columns, but there is an error in my code. It doesn't accept value of element from 2dim array into C[x]. Can anybody help please?

static int counting_sortx(...
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 10:09 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC