Click here to Skip to main content
16,016,229 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Unable to receive custom Ethernet frame Pin
Donnie_Song2-Sep-18 3:32
Donnie_Song2-Sep-18 3:32 
GeneralRe: Unable to receive custom Ethernet frame Pin
Jochen Arndt2-Sep-18 7:58
professionalJochen Arndt2-Sep-18 7:58 
QuestionInvalid operands Pin
meerokh29-Aug-18 4:30
meerokh29-Aug-18 4:30 
AnswerRe: Invalid operands Pin
Victor Nijegorodov29-Aug-18 4:39
Victor Nijegorodov29-Aug-18 4:39 
GeneralRe: Invalid operands Pin
meerokh29-Aug-18 4:49
meerokh29-Aug-18 4:49 
QuestionRe: Invalid operands Pin
David Crow29-Aug-18 9:34
David Crow29-Aug-18 9:34 
AnswerRe: Invalid operands Pin
Richard MacCutchan29-Aug-18 5:51
mveRichard MacCutchan29-Aug-18 5:51 
AnswerRe: Invalid operands Pin
CPallini29-Aug-18 20:53
mveCPallini29-Aug-18 20:53 
You have to comply with the assigned interface, but such interface would probably make your Fibonacci series computation rather clumsy. I suggest you to separate the tasks: write a fibonacci function complying with the required interface wich, in turn, calls a trivial recursive implementation (say myfib) of the series computation:
C
#include <stdio.h>

struct args
{
  int number;
  int result;
};

// trivial recursive implementation on Fibonacci series computation
static int myfib( int n )
{ 
  if ( n < 3 )
    return 1;
  else 
    return myfib(n-1) + myfib(n-2);
}

// the interface compliant function
void fibonacci( void * arguments )
{
  struct args * pargs = (struct args *) arguments;
  pargs->result = myfib( pargs->number); // call the private workhorse
}

// test program
int main()
{
  struct args a = { 10, 0 };
  fibonacci( &a );
  printf("fibonacci(%d)=%d\n", a.number, a.result);
  return 0;
}

QuestionRearrange array in alternating positive & negative items with O(1) extra space, while keeping the order of the elements maintained. Pin
Tarun Jha28-Aug-18 18:33
Tarun Jha28-Aug-18 18:33 
AnswerRe: Rearrange array in alternating positive & negative items with O(1) extra space, while keeping the order of the elements maintained. Pin
CPallini28-Aug-18 21:52
mveCPallini28-Aug-18 21:52 
QuestionHow I can make the GUI like as photoshop (dark theme) by using Visual Studio C++ ? Pin
sasia22521-Aug-18 17:38
sasia22521-Aug-18 17:38 
AnswerRe: How I can make the GUI like as photoshop (dark theme) by using Visual Studio C++ ? Pin
Richard MacCutchan21-Aug-18 21:19
mveRichard MacCutchan21-Aug-18 21:19 
GeneralRe: How I can make the GUI like as photoshop (dark theme) by using Visual Studio C++ ? Pin
sasia22521-Aug-18 21:28
sasia22521-Aug-18 21:28 
GeneralRe: How I can make the GUI like as photoshop (dark theme) by using Visual Studio C++ ? Pin
Richard MacCutchan21-Aug-18 22:38
mveRichard MacCutchan21-Aug-18 22:38 
GeneralRe: How I can make the GUI like as photoshop (dark theme) by using Visual Studio C++ ? Pin
sasia22521-Aug-18 22:44
sasia22521-Aug-18 22:44 
AnswerRe: How I can make the GUI like as photoshop (dark theme) by using Visual Studio C++ ? Pin
Jochen Arndt21-Aug-18 22:40
professionalJochen Arndt21-Aug-18 22:40 
GeneralRe: How I can make the GUI like as photoshop (dark theme) by using Visual Studio C++ ? Pin
sasia22521-Aug-18 22:43
sasia22521-Aug-18 22:43 
AnswerRe: How I can make the GUI like as photoshop (dark theme) by using Visual Studio C++ ? Pin
Michael Haephrati28-Aug-18 4:27
professionalMichael Haephrati28-Aug-18 4:27 
QuestionUsing Alternate Memory Heaps Pin
Richard Andrew x6419-Aug-18 10:04
professionalRichard Andrew x6419-Aug-18 10:04 
AnswerRe: Using Alternate Memory Heaps Pin
Richard MacCutchan19-Aug-18 21:24
mveRichard MacCutchan19-Aug-18 21:24 
AnswerRe: Using Alternate Memory Heaps Pin
Daniel Pfeffer21-Aug-18 5:46
professionalDaniel Pfeffer21-Aug-18 5:46 
GeneralRe: Using Alternate Memory Heaps Pin
Richard Andrew x6421-Aug-18 12:08
professionalRichard Andrew x6421-Aug-18 12:08 
GeneralRe: Using Alternate Memory Heaps Pin
Daniel Pfeffer21-Aug-18 20:21
professionalDaniel Pfeffer21-Aug-18 20:21 
GeneralRe: Using Alternate Memory Heaps Pin
Richard Andrew x6422-Aug-18 0:39
professionalRichard Andrew x6422-Aug-18 0:39 
QuestionIterating over an indefinitely large number of concentric loops Pin
Anthony Appleyard16-Aug-18 1:54
Anthony Appleyard16-Aug-18 1:54 

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.