Click here to Skip to main content
14,659,658 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: WritePrinter Fails to Print on Inkjet Printer Pin
sandford_j30-Sep-20 12:05
professionalsandford_j30-Sep-20 12:05 
AnswerRe: WritePrinter Fails to Print on Inkjet Printer Pin
mo14921-Oct-20 1:18
Membermo14921-Oct-20 1:18 
GeneralRe: WritePrinter Fails to Print on Inkjet Printer Pin
sandford_j1-Oct-20 2:53
professionalsandford_j1-Oct-20 2:53 
QuestionCopying to ClipBoard By using SendInput, Failure....[Solved] Pin
EuiyongYun28-Sep-20 14:37
MemberEuiyongYun28-Sep-20 14:37 
AnswerRe: Copying to ClipBoard By using SendInput, Failure.... Pin
Victor Nijegorodov28-Sep-20 22:59
MemberVictor Nijegorodov28-Sep-20 22:59 
GeneralRe: Copying to ClipBoard By using SendInput, Failure.... Pin
EuiyongYun29-Sep-20 2:50
MemberEuiyongYun29-Sep-20 2:50 
GeneralRe: Copying to ClipBoard By using SendInput, Failure.... Pin
Victor Nijegorodov29-Sep-20 7:22
MemberVictor Nijegorodov29-Sep-20 7:22 
QuestionHow do I convert my C++ function pointer to a C function pointer? Pin
arnold_w28-Sep-20 5:06
Memberarnold_w28-Sep-20 5:06 
I am writing code for an ARM processor and compiling with GCC inside Eclipse IDE. When the application wants something to get done, it needs to create a task and queue it:
typedef uint32_t (*task_t)(uint8_t* data, uint16_t dataSizeBytes);
void queueTask(task_t task, uint8_t* data, uint16_t dataSizeBytes);
Now I want to be able to queue C++ tasks inside the same task queue:
#include <functional>
using namespace std;
using taskCpp_t = function <uint32_t(uint8_t* dataPtr, uint16_t dataSizeBytes)>;
void queueTaskCpp(taskCpp_t task, uint8_t* data, uint16_t dataSizeBytes);
The compiler complains when I simply try to cast my C++ function pointer into a C function pointer:
void queueTaskCpp(taskCpp_t task, uint8_t* data, uint16_t dataSizeBytes) {
    queueTask((task_t)task, NULL, 0);  // Compiler complains!!!
}
Does anybody know what I can do to be able to queue taskCpp_t tasks into the same queue as the task_t are queued into?
AnswerRe: How do I convert my C++ function pointer to a C function pointer? Pin
Richard MacCutchan28-Sep-20 5:54
mveRichard MacCutchan28-Sep-20 5:54 
AnswerRe: How do I convert my C++ function pointer to a C function pointer? Pin
CPallini28-Sep-20 6:07
mveCPallini28-Sep-20 6:07 
GeneralRe: How do I convert my C++ function pointer to a C function pointer? Pin
arnold_w28-Sep-20 7:33
Memberarnold_w28-Sep-20 7:33 
AnswerRe: How do I convert my C++ function pointer to a C function pointer? Pin
Mircea Neacsu28-Sep-20 6:14
MemberMircea Neacsu28-Sep-20 6:14 
QuestionEmbedded C program Pin
Parth Akshay Barange22-Sep-20 22:27
MemberParth Akshay Barange22-Sep-20 22:27 
SuggestionRe: Embedded C program Pin
Graham Breach22-Sep-20 22:59
MemberGraham Breach22-Sep-20 22:59 
AnswerRe: Embedded C program Pin
Richard MacCutchan22-Sep-20 23:40
mveRichard MacCutchan22-Sep-20 23:40 
AnswerRe: Embedded C program Pin
CPallini23-Sep-20 1:12
mveCPallini23-Sep-20 1:12 
AnswerRe: Embedded C program Pin
Victor Nijegorodov23-Sep-20 8:42
MemberVictor Nijegorodov23-Sep-20 8:42 
AnswerRe: Embedded C program Pin
Dave Kreskowiak23-Sep-20 9:20
mveDave Kreskowiak23-Sep-20 9:20 
QuestionWhy isn't the copy constructor called Pin
Mircea Neacsu22-Sep-20 14:59
MemberMircea Neacsu22-Sep-20 14:59 
AnswerRe: Why isn't the copy constructor called Pin
_Flaviu22-Sep-20 19:48
Member_Flaviu22-Sep-20 19:48 
GeneralRe: Why isn't the copy constructor called Pin
Mircea Neacsu23-Sep-20 1:45
MemberMircea Neacsu23-Sep-20 1:45 
AnswerRe: Why isn't the copy constructor called Pin
Richard MacCutchan22-Sep-20 23:38
mveRichard MacCutchan22-Sep-20 23:38 
GeneralRe: Why isn't the copy constructor called Pin
Mircea Neacsu23-Sep-20 1:56
MemberMircea Neacsu23-Sep-20 1:56 
AnswerRe: Why isn't the copy constructor called - Solved Pin
Mircea Neacsu23-Sep-20 2:56
MemberMircea Neacsu23-Sep-20 2:56 
GeneralRe: Why isn't the copy constructor called - Solved Pin
Richard MacCutchan23-Sep-20 3:01
mveRichard MacCutchan23-Sep-20 3:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.