Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2006-11-30
6
Medium Priority
?
795 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Technology Partners: 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!

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

610 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