Solved

cannot convert parameter 1 from 'class CStringArray' to 'class CStringArray'

Posted on 2006-11-30
6
735 Views
Last Modified: 2013-11-20
Hi guys,

I just got this error when trying to compile:

cannot convert parameter 1 from 'class CStringArray' to 'class CStringArray'


It makes no sense to me, anybody able to help me out?


Cheers!
0
Comment
Question by:Cyber-Drugs
  • 4
  • 2
6 Comments
 
LVL 22

Expert Comment

by:mahesh1402
ID: 18045041
for which line you are getting same ?
0
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 18045048
Getting it on this line:

      HTML_ProgressBarStatus(progStatus);


Here is the code used to populate the CStringArray:

      CStringArray progStatus;
      progStatus.Add("0%");
      HTML_ProgressBarStatus(progStatus);

Here is the function header:

void HTML_ProgressBarStatus(CStringArray status);



Any ideas?
0
 
LVL 22

Expert Comment

by:mahesh1402
ID: 18045057
btw When you pass by value you require a copy to be made. Classes derived from CObject cannot be copied or assigned. You should pass the CStringArray object by reference .

e.g declare like :

void MyFunction(CStringArray &array)
{
.....
}

-MAHESH
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 22

Expert Comment

by:mahesh1402
ID: 18045061
Make it...
void HTML_ProgressBarStatus(CStringArray &status);

and pass value by reference.,

-MAHESH
0
 
LVL 22

Accepted Solution

by:
mahesh1402 earned 500 total points
ID: 18045097
just make it
void HTML_ProgressBarStatus(CStringArray &status) to define n declare.
0
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 18045123
That did it, cheers mahesh! :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Decoding 32 bit binary streams 6 37
VB.NET how to use the Vertical ScrollBar 5 90
Creating Labels and Frequency list style reports in SAS code 9 92
Path of Workbook 3 59
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now