Solved

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

Posted on 2006-11-30
6
770 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
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!

 
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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

690 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