16,004,564 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by longjmp (Top 11 by date)
longjmp
13-Dec-22 4:28am
View
I understand that you need to put some c++ code in .sc files instead of .cpp files, if that's the case, it's no problem, the VC++ compiler provides the option to treat any file as a c++ source file, and you can set /Tp filename.sc to do that.
longjmp
13-Dec-22 4:28am
View
Deleted
I understand that you need to put some c++ code in .sc files instead of .cpp files, if that's the case, it's no problem, the VC++ compiler provides the option to treat any file as a c++ source file, and you can set /Tp filename.sc to do that.
longjmp
1-Dec-22 0:45am
View
thank you merano99, I think I just replied to Деян Цонев's question:
"Also I think the cast to void* could affect the value of the const char * despite it constant value imperative could not be changed ."
longjmp
30-Nov-22 16:36pm
View
cast const char* to void* will not modify its characters,
even casting from writable char* to void*,
the 'casting' just got an address value (a pointer),
but never change the contents that pointer referenced.
you can check it by code:
#include <iostream>
using namespace std;
int main(){
const char* p = "xxxxxxzzzzyy";
char c[] = "zUUUU";
cout << p << endl;
void* p2 = (void*)p;
cout << (char*)p2 << endl;
cout << (const char*)p2 << endl;
p2 = (void*)c;
cout << (char*)p2<
longjmp
29-Nov-22 3:53am
View
move the if {...} sentence into main {} like this: #include<stdio.h> int main() { float FSc, NTS; printf("Enter FSc marks:"); scanf("%f",&FSc); printf("Enter NTS marks:"); scanf("%f",&NTS); if(FSc>70) { if(NTS>=70) { printf("Congrats, you have been accepted in IT Department, Oxford University!"); } else(NTS>=60) { printf("Congrats, you have been accepted in Electronics Department, Oxford University!"); } } return 0; // add a return sentence }
longjmp
29-Nov-22 2:59am
View
Deleted
move the if {...} sentence into main {} like this:
#include<stdio.h>
int main()
{
float FSc, NTS;
printf("Enter FSc marks:");
scanf("%f",&FSc);
printf("Enter NTS marks:");
scanf("%f",&NTS);
if(FSc>70)
{
if(NTS>=70)
{
printf("Congrats, you have been accepted in IT Department, Oxford University!");
}
else(NTS>=60)
{
printf("Congrats, you have been accepted in Electronics Department, Oxford University!");
}
}
return 0; // add a return sentence
}
longjmp
28-Nov-22 2:41am
View
I think you found the key.
======================================
Using and string construction, use
basic_string( std::initializer_list<chart> ilist,
const Allocator& alloc = Allocator() ).
=====================
std::initializer_list<chart> can accept {true, true, true, false, true, 'a'}.
Since sizeof(CharT) >= sizeof(bool), it will result in an "implicit conversion" from bool to CharT.
And this code compiles fine without errors or warnings.
USHORT u16 = 8.
std::initializer_list<uint32> list32 = {u16, u16};
longjmp
27-Nov-22 21:31pm
View
@Richard MacCutchan: Thanks for telling me about this useful library, I didn't know about it before (I compiled the code on cygwin and it didn't provide that library), it looks good.
longjmp
25-Nov-22 21:29pm
View
I have updated a new demo at:
http://ladder.42web.io/src/CppSvc2.7z
[
^
]
please look at the two projects:
VBClient\CppDll.
the key is to give the buffer size (count of structs) to Marshal service.
longjmp
18-Nov-22 14:14pm
View
Back to vc6 and look for that two controls in dialog editor?
longjmp
15-Nov-22 22:11pm
View
Glad to hear you solved the problem, I also wrote an example to show how to pass it, at the time I didn't have VS2008 and an OS that supported it, I have since downloaded and deployed these on a VM. I'm guessing that your solution perhaps does something very similar to using the COM approach perhaps (data packaging and unpackaging, and perhaps calling some sort of COM proxy/stub interface). Your solution looks more concise than mine, and if it all works the same, maybe no additional GUIDs would be best? Just my guess, I'm not familiar with VB.NET, thank you, I learned a good trick too.
My COM Sample: http://ladder.42web.io/src/CppSvc.zip
Show More