Click here to Skip to main content
15,888,579 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: FIFO en languge C Pin
Patrice T30-Apr-16 21:29
mvePatrice T30-Apr-16 21:29 
AnswerRe: FIFO en languge C Pin
CPallini1-May-16 20:49
mveCPallini1-May-16 20:49 
QuestionFour methods to create, pass to function and delete 2d arrays in c++ Pin
Javier Luis Lopez28-Apr-16 23:32
Javier Luis Lopez28-Apr-16 23:32 
AnswerRe: Three methods to create, pass to function and delete 2d arrays in c++ Pin
Bram van Kampen29-Apr-16 12:27
Bram van Kampen29-Apr-16 12:27 
GeneralRe: Three methods to create, pass to function and delete 2d arrays in c++ Pin
Javier Luis Lopez29-Apr-16 23:05
Javier Luis Lopez29-Apr-16 23:05 
AnswerRe: Three methods to create, pass to function and delete 2d arrays in c++ Pin
leon de boer29-Apr-16 18:01
leon de boer29-Apr-16 18:01 
GeneralRe: Three methods to create, pass to function and delete 2d arrays in c++ Pin
Javier Luis Lopez29-Apr-16 23:08
Javier Luis Lopez29-Apr-16 23:08 
GeneralRe: Three methods to create, pass to function and delete 2d arrays in c++ Pin
leon de boer30-Apr-16 0:47
leon de boer30-Apr-16 0: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 22:52
manoharbalu28-Apr-16 22:52 
AnswerRe: How to send huge data via sockets in continuous intervals Pin
Shyam Kodase28-Apr-16 23:39
Shyam Kodase28-Apr-16 23:39 
GeneralRe: How to send huge data via sockets in continuous intervals Pin
manoharbalu29-Apr-16 0:32
manoharbalu29-Apr-16 0:32 
GeneralRe: How to send huge data via sockets in continuous intervals Pin
Shyam Kodase22-May-16 21:15
Shyam Kodase22-May-16 21:15 
AnswerRe: How to send huge data via sockets in continuous intervals Pin
Shyam Kodase28-Apr-16 23:42
Shyam Kodase28-Apr-16 23:42 
QuestionPhone Dialer Pin
Bram van Kampen28-Apr-16 12:57
Bram van Kampen28-Apr-16 12:57 
QuestionRe: Phone Dialer Pin
David Crow28-Apr-16 17:16
David Crow28-Apr-16 17:16 
AnswerRe: Phone Dialer Pin
Bram van Kampen29-Apr-16 11:43
Bram van Kampen29-Apr-16 11:43 
QuestionRe: Phone Dialer Pin
David Crow30-Apr-16 9:30
David Crow30-Apr-16 9:30 
AnswerRe: Phone Dialer Pin
Bram van Kampen1-May-16 14:30
Bram van Kampen1-May-16 14:30 
SuggestionRe: Phone Dialer Pin
David Crow1-May-16 16:32
David Crow1-May-16 16:32 
GeneralRe: Phone Dialer Pin
Bram van Kampen2-May-16 14:12
Bram van Kampen2-May-16 14:12 
GeneralRe: Phone Dialer Pin
Bram van Kampen2-May-16 15:01
Bram van Kampen2-May-16 15:01 
AnswerRe: Phone Dialer Pin
Bram van Kampen3-May-16 12:36
Bram van Kampen3-May-16 12:36 
QuestionRe: Phone Dialer Pin
David Crow3-May-16 17:30
David Crow3-May-16 17:30 
AnswerRe: Phone Dialer Pin
Bram van Kampen4-May-16 14:05
Bram van Kampen4-May-16 14:05 
QuestionHow to implement Ctrl + tab to navigate between tabs in a CTabCtrl Pin
Amrit Agr28-Apr-16 5:49
Amrit Agr28-Apr-16 5: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.