15,908,111 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 Python 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 robvleugel (Top 6 by date)
robvleugel
3-Feb-23 12:47pm
View
Yes namespace::RegisterFunction(SomeFunc, SomeFunc).
In the execution part, I haven't changed anything. Except the Script:: part is now from the namespace, instead of the class name. You can call a function by Namepace::func() or a static member function by Classname::func() likewise.
There is not so much I changed in the code, which is why I don't understand this won't work when I put the code in a namespace instead of a class with static member functions that I never instantiate.
robvleugel
5-May-19 13:30pm
View
Got it working, thanks a lot Richard!
robvleugel
5-May-19 12:59pm
View
Overlooked that one, since it uses the va list this might just work. Ill check it out, thanks Richard!
robvleugel
5-May-19 12:27pm
View
Thanks for the suggestion Richard.
There is one more downside to this: I'd have to include the SDL.h file in every code file that uses the GameLog function.
robvleugel
5-May-19 10:53am
View
I've given it, its:
void SDL_Log(const char* fmt, ...)
The ... means variable number of arguments. That's what makes this a pain in the ass for me.
robvleugel
5-May-19 10:51am
View
Hm yes, but none of the solutions seem to work. Normal function pointers for instance don't do the trick here, as std::function doesn't seems to accept (...).
Show More