Click here to Skip to main content
15,889,462 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Simplex Downhill... Pin
Stefan_Lang7-Aug-18 22:05
Stefan_Lang7-Aug-18 22:05 
GeneralRe: Simplex Downhill... Pin
User 110609798-Aug-18 1:41
User 110609798-Aug-18 1:41 
GeneralRe: Simplex Downhill... Pin
Stefan_Lang8-Aug-18 2:11
Stefan_Lang8-Aug-18 2:11 
GeneralRe: Simplex Downhill... Pin
User 110609798-Aug-18 10:18
User 110609798-Aug-18 10:18 
Questionhelp me~ for use..... #define macro ## #@ # Pin
dsyoon ds29-Jul-18 17:07
dsyoon ds29-Jul-18 17:07 
AnswerRe: help me~ for use..... #define macro ## #@ # Pin
Daniel Pfeffer29-Jul-18 20:42
professionalDaniel Pfeffer29-Jul-18 20:42 
AnswerRe: help me~ for use..... #define macro ## #@ # Pin
Richard MacCutchan29-Jul-18 21:26
mveRichard MacCutchan29-Jul-18 21:26 
AnswerRe: help me~ for use..... #define macro ## #@ # Pin
Chris Losinger30-Jul-18 8:32
professionalChris Losinger30-Jul-18 8:32 
if you insist on using macros, then you will need to do something ugly, like:

C++
#define FUNC_N(n,x) (n==1 ? FUNC_1(x) : n==2 ? FUNC_2(x) : n==3 ? FUNC_3(x) : n==4 ? FUNC_4(x) : 0)


it's much better to just make a function that can switch on n:
C++
int FUNC_N(int n, int x)
{
    switch (n)
    {
       case 1: return FUNC_1(x);
  
    }
}


QuestionRead text from a file and realloc when needed Pin
claymorehack6-Jul-18 4:02
claymorehack6-Jul-18 4:02 
AnswerRe: Read text from a file and realloc when needed Pin
Richard MacCutchan6-Jul-18 4:08
mveRichard MacCutchan6-Jul-18 4:08 
GeneralRe: Read text from a file and realloc when needed Pin
claymorehack7-Jul-18 22:46
claymorehack7-Jul-18 22:46 
GeneralRe: Read text from a file and realloc when needed Pin
Richard MacCutchan8-Jul-18 2:49
mveRichard MacCutchan8-Jul-18 2:49 
QuestionLookup table with angles Pin
cristiapi6-Jul-18 2:30
cristiapi6-Jul-18 2:30 
AnswerRe: Lookup table with angles Pin
Stefan_Lang5-Aug-18 23:09
Stefan_Lang5-Aug-18 23:09 
QuestionBig-O Notation Pin
Manish16927-Jun-18 18:31
Manish16927-Jun-18 18:31 
AnswerRe: Big-O Notation Pin
Richard Andrew x648-Jul-18 3:33
professionalRichard Andrew x648-Jul-18 3:33 
QuestionTime complexity Pin
Manish16927-Jun-18 1:42
Manish16927-Jun-18 1:42 
AnswerRe: Time complexity Pin
Richard MacCutchan27-Jun-18 2:28
mveRichard MacCutchan27-Jun-18 2:28 
GeneralRe: Time complexity Pin
Manish16927-Jun-18 17:24
Manish16927-Jun-18 17:24 
GeneralRe: Time complexity Pin
Richard Deeming28-Jun-18 0:54
mveRichard Deeming28-Jun-18 0:54 
GeneralRe: Time complexity Pin
Richard MacCutchan28-Jun-18 0:58
mveRichard MacCutchan28-Jun-18 0:58 
GeneralRe: Time complexity Pin
Richard Deeming28-Jun-18 1:08
mveRichard Deeming28-Jun-18 1:08 
GeneralRe: Time complexity Pin
Richard MacCutchan28-Jun-18 1:20
mveRichard MacCutchan28-Jun-18 1:20 
AnswerRe: Time complexity Pin
Gerry Schmitz27-Jun-18 9:55
mveGerry Schmitz27-Jun-18 9:55 
GeneralRe: Time complexity Pin
Manish16927-Jun-18 17:25
Manish16927-Jun-18 17:25 

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.