Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 805
  • Last Modified:

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

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
Cyber-Drugs
Asked:
Cyber-Drugs
  • 4
  • 2
1 Solution
 
mahesh1402Commented:
for which line you are getting same ?
0
 
Cyber-DrugsAuthor Commented:
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
 
mahesh1402Commented:
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
mahesh1402Commented:
Make it...
void HTML_ProgressBarStatus(CStringArray &status);

and pass value by reference.,

-MAHESH
0
 
mahesh1402Commented:
just make it
void HTML_ProgressBarStatus(CStringArray &status) to define n declare.
0
 
Cyber-DrugsAuthor Commented:
That did it, cheers mahesh! :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now