?
Solved

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

Posted on 2006-11-30
6
Medium Priority
?
781 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

 
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 2000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

762 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