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

C / C++ / MFC

 
AnswerRe: FIFO en languge C Pin
Patrice T30-Apr-16 22:29
mvePatrice T30-Apr-16 22:29 
AnswerRe: FIFO en languge C Pin
CPallini1-May-16 21:49
mveCPallini1-May-16 21:49 
QuestionFour methods to create, pass to function and delete 2d arrays in c++ Pin
Javier Luis Lopez29-Apr-16 0:32
MemberJavier Luis Lopez29-Apr-16 0:32 
AnswerRe: Three methods to create, pass to function and delete 2d arrays in c++ Pin
Bram van Kampen29-Apr-16 13:27
MemberBram van Kampen29-Apr-16 13:27 
GeneralRe: Three methods to create, pass to function and delete 2d arrays in c++ Pin
Javier Luis Lopez30-Apr-16 0:05
MemberJavier Luis Lopez30-Apr-16 0:05 
AnswerRe: Three methods to create, pass to function and delete 2d arrays in c++ Pin
leon de boer29-Apr-16 19:01
Memberleon de boer29-Apr-16 19:01 
GeneralRe: Three methods to create, pass to function and delete 2d arrays in c++ Pin
Javier Luis Lopez30-Apr-16 0:08
MemberJavier Luis Lopez30-Apr-16 0:08 
GeneralRe: Three methods to create, pass to function and delete 2d arrays in c++ Pin
leon de boer30-Apr-16 1:47
Memberleon de boer30-Apr-16 1:47 
Can I point out that if you really want portability with C++11, we do this and there is nothing your code can do with this as it uses the standard vector library
#include <vector>
using namespace std;

#define YMAX 6
#define XMAX 4

// single line to define a 2D array of floats
vector<vector<float>>  matrix1(YMAX, vector<float>(XMAX));

// Now you can just set values
matrix1[0][0] = 3.6f;
matrix1[1][2] = 4.0f;
matrix1[5][3] = 8.0f;

// Or read them back
float f = matrix1[1][2];

The really cute part is it can be used on any standard type
// single line to define a 2D array of STRINGS
vector<vector<string>>  stringmatrix(YMAX, vector<string>(XMAX));

// writing strings in the array
stringmatrix[0][0] = "hello at 0,0";
stringmatrix[1][2] = "this one";
stringmatrix[5][3] = "hello at 5,3";

// Getting string value from the array 
string whatdidwesay = stringmatrix[1][2];

In vino veritas


modified 30-Apr-16 9:29am.

QuestionHow to send huge data via sockets in continuous intervals Pin
manoharbalu28-Apr-16 23:52
Membermanoharbalu28-Apr-16 23:52 
AnswerRe: How to send huge data via sockets in continuous intervals Pin
Shyam Kodase29-Apr-16 0:39
MemberShyam Kodase29-Apr-16 0:39 
GeneralRe: How to send huge data via sockets in continuous intervals Pin
manoharbalu29-Apr-16 1:32
Membermanoharbalu29-Apr-16 1:32 
GeneralRe: How to send huge data via sockets in continuous intervals Pin
Shyam Kodase22-May-16 22:15
MemberShyam Kodase22-May-16 22:15 
AnswerRe: How to send huge data via sockets in continuous intervals Pin
Shyam Kodase29-Apr-16 0:42
MemberShyam Kodase29-Apr-16 0:42 
QuestionPhone Dialer Pin
Bram van Kampen28-Apr-16 13:57
MemberBram van Kampen28-Apr-16 13:57 
QuestionRe: Phone Dialer Pin
David Crow28-Apr-16 18:16
MemberDavid Crow28-Apr-16 18:16 
AnswerRe: Phone Dialer Pin
Bram van Kampen29-Apr-16 12:43
MemberBram van Kampen29-Apr-16 12:43 
QuestionRe: Phone Dialer Pin
David Crow30-Apr-16 10:30
MemberDavid Crow30-Apr-16 10:30 
AnswerRe: Phone Dialer Pin
Bram van Kampen1-May-16 15:30
MemberBram van Kampen1-May-16 15:30 
SuggestionRe: Phone Dialer Pin
David Crow1-May-16 17:32
MemberDavid Crow1-May-16 17:32 
GeneralRe: Phone Dialer Pin
Bram van Kampen2-May-16 15:12
MemberBram van Kampen2-May-16 15:12 
GeneralRe: Phone Dialer Pin
Bram van Kampen2-May-16 16:01
MemberBram van Kampen2-May-16 16:01 
AnswerRe: Phone Dialer Pin
Bram van Kampen3-May-16 13:36
MemberBram van Kampen3-May-16 13:36 
QuestionRe: Phone Dialer Pin
David Crow3-May-16 18:30
MemberDavid Crow3-May-16 18:30 
AnswerRe: Phone Dialer Pin
Bram van Kampen4-May-16 15:05
MemberBram van Kampen4-May-16 15:05 
QuestionHow to implement Ctrl + tab to navigate between tabs in a CTabCtrl Pin
Amrit Agr28-Apr-16 6:49
MemberAmrit Agr28-Apr-16 6:49 

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.