🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #15456

Re: Concatenation and function declaration syntax

#15456
From: pierugg
Date: Sat, 28 Jun 2003 17:45
49 lines
2647 bytes
Sorry wrong group, ignore it
pierugg <pierugg@kana.fr.st> wrote in message
news:3efdd01f@newsgroups.borland.com...
> Hi all,
>
> i got two questions, first when a function needs a string as argument and
in
> my app the string is made up of two strings how can i pass the two of them
> as argument?
> Example:
> i got two strings driveletter and path
> if I want to call directoryexists in vb i do Directoryexists(driveletter &
> path). i think the & is called concatenation operator or something like
> that, vb's is & and php's is "." , does c++ have one? Or do i have to use
> concatenate() ?
>
> 2nd question, i declared a function "void RunApp(char *slFileName);"
outside
> of all other functions, with the includes and then I have my function
> "void RunApp(char *slFileName) {
>   int slResuslt = int(ShellExecute(0, "open", slFileName,0, 0,
> SW_SHOWNORMAL));
>
>   if(slResuslt <= 32)
>   {
>     AnsiString slMessage;
>     slMessage = "Error: could not execute program!";
>     Application -> MessageBox(slMessage.c_str(), "Error!",MB_OK +
> MB_ICONEXCLAMATION);
>   }
> }"
>
>
> and I get these errors: "[C++ Error] MainKatapult.cpp(64): E2141
Declaration
> syntax error." for line 2 ( the "{"  )
> and "[C++ Error] MainKatapult.cpp(80): E2139 Declaration missing ;.
> [C++ Error] MainKatapult.cpp(80): E2134 Compound statement missing }.
> [C++ Error] MainKatapult.cpp(80): E2134 Compound statement missing }."
>
> for the line after the final "}"
>
> I really don't see why, does anyone?
>
> thanks
>
> pierugg
>
>
Technical Details
Message-ID: <3efdd198@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!feedwest.aleron.net!aleron.net!news-out1.nntp.be!propagator2-sterling!news-in-sterling.newsfeed.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3efdd01f@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,34d3af52a8f23dc8
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-06-28 10:36:36 PST
From: "pierugg" <pierugg@kana.fr.st>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3efdd01f@newsgroups.borland.com>
Subject: Re: Concatenation and function declaration syntax
Date: Sat, 28 Jun 2003 19:45:38 +0200
Lines: 51
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
NNTP-Posting-Host: 81.56.19.39
Message-ID: <3efdd198@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1056821656 81.56.19.39 (28 Jun 2003 10:34:16 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!feedwest.aleron.net!aleron.net!news-out1.nntp.be!propagator2-sterling!news-in-sterling.newsfeed.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail