Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

simple application c++

Status
Not open for further replies.

eng.hasan.power

Member level 1
Joined
Mar 30, 2006
Messages
39
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,597
Hi everyone,
i have a simple question, im not expert with C++ stuff,
the question is, my SW is wearching into a text file for a string, then i need to show that string in a Messagebox, and later i will pass it to FPGA,

the question not related to FPGA, its a simple C++ (i think), here is my code

while(!srcfile.eof()) //here im looking for the string i want
{
getline (srcfile,line);
int offset;
if ((offset = line.find(first, 0)) != string::npos) {
cout << "found '" << first << "' @ offset " << offset << endl;
break;
}
i++ ; //line number
}
MessageDlg("found at line." + i , 0); //here im trying to show the line number in messagebox, BUT i receive this error

[BCC32 Warning] ScanDirector_Startup.cpp(82): W8012 Comparing signed and unsigned values
[BCC32 Error] ScanDirector_Startup.cpp(91): E2285 Could not find a match for 'MessageDlg(const wchar_t *,int)'

thanks in advance
 

ruschi

Newbie level 4
Joined
Oct 19, 2007
Messages
7
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
Manaus
Activity points
1,333
Well, I guess the question is "Why do you I get and error?"
Your compiler first complains about comparison of unsigned and singed values: Make offset a unsigned value (uint16_t, uint32_t...)
The error seems also quite obvious: Could not find a match for 'MessageDlg(const wchar_t *,int)'
1.) I do not see forward declarations of the function. Include the appropriate header.
2.) make sure you also link (or compile and link) the a library or function body.

I hope that helps.

Best regards
Thomas
 

eng.hasan.power

Member level 1
Joined
Mar 30, 2006
Messages
39
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,597
Thanks bunch Thomas, the problem solved :), it was a library
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top