user20119: I have Googled quite a lot regarding using a C++ program for uploading to Arduino and related, however I am confused now. Right, my problem is this:
I have written a C++ program which imports RGB data of a 24 bit bitmap (which was generated using Matlab) and now I would like to use this array (3 arrays - R,G,B) for an Arduino sketch to be used for a LED matrix project that I am working on. I am not exactly a programmer and hence had to resort to this path -- MATLAB to c++ and then Arduino, although this could be entirely done in C++ too (importing a bitmap and extracting pixel info). So, my C++ code spits out the 3 arrays and I am not sure how to get those into an Arduino sketch. 
I read a lot about this and I understood this - As the Arduino "language" is C and C++ therefore it is possible to program an Arduino in C++/c. I need a maker file and a compiler. However my question is that isn't there a more non-programmer friendly way to get this done, some software or an IDE which supports Arduino programming in C++? I cannot understand much of this method, hence trying to bypass this. 
If anybody's got any better method, I would be really glad if you could share it. I am also looking to use the Arduino package for MATLAB to send the array directly from there using serial communication. But I just wanted to make sure I at least tried this path.
Would really appreciate if somebody could offer some help. I am quite stuck here. 
Can share any other info if required. 
Thanks a lot!

EDIT 1:
To clarify as Nick Gammon pointed out in the comments below. In brief steps, this is what I have done till now:

Got a 24 bit bitmap (some random image)
Extracted the RGB data for each pixel using Matlab
Have 3 arrays of (for eg.) 122X300 dimensions whose every element has values between 0-255 (8 bit) and for R,G and B colors
Want to get these 3 arrays for use in Arduino sketch for further working
Stuck here - how to do that .....
So I did this - I imported that the RGB data into 3 separate text files and made a c++ program to read those arrays assuming that I should be able to then somehow use this program in Arduino sketch.
Now I am not sure what to do....my goal would be to have these 3 arrays (CRGB arrays, FastLED) in my arduino sketch which I can control and then upload to my Due.
On googling I found that to use c++ for arduino , you need the avr compiler and make file, which I want to avoid. Tried other IDEs too, Eclipse, PlatformIO too .. ummmm ... not that successful to be honest.
as per Paul's ans- Matlab to Arduino method I have to try. 
Hope I have clarified my process till now :)


EDIT 2: 


C++ code for reading the above array (thought I could use the output in Arduino)
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <string>
#include <conio.h>
#include <sstream>
#include <stdlib.h>


const int HEIGHT = 4;

const int WIDTH = 5;

using namespace std;

int main(){

  int array_req [HEIGHT][WIDTH];

string userinputprompt, filename;

userinputprompt = "COLORDATA FILENAME: ";

cout<<userinputprompt<<endl;

getline(cin,filename);

ifstream inputfile;

inputfile.open(filename.c_str());

 for (int i = 0; i < HEIGHT; ++i)
{
  std::string tmpString;
  std::getline(inputfile, tmpString);

 std::stringstream ss(tmpString);

 for(int j=0;j < WIDTH; ++j)
  {
    ss >> array_req[i][j];
  }
 }

    for(int p=0; p<HEIGHT; p++)
    {
      for(int q=0; q<WIDTH; q++)
    {
        cout<<array_req[p][q]<<" ";
    }
    cout<<"\n";
}

inputfile.close();
getchar();
return 0;

}


user10794: 
As the arduino "language" is C and C++ therefore it is possible to program an Arduino in C++/c. I need a maker file and a compiler. However my question is that isn't there a more non-programmer friendly way to get this done, some software or an IDE which supports Arduino programming in C++?

Yes, it's called the Arduino IDE. You plug your board into the USB port, write your program, or use an existing example, and then hit the Upload button.

user7856: Here's a sample program you could use as reference, just replace the values in the array and adjust VALUES_NUMBER accordingly.
Disclaimer: I didn't try to compile/run it, but it should give you an idea of how to use the values you already have.
// These are Arduino Pins that support "analog" output.
const unsigned short ANALOG_RED_PIN = 3;
const unsigned short ANALOG_GREEN_PIN = 5;
const unsigned short ANALOG_BLUE_PIN = 6;

const unsigned int VALUES_NUMBER = 12;

const unsigned short REDS[VALUES_NUMBER] = {
  0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
  0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B
};

const unsigned short GREENS[VALUES_NUMBER] = {
  0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
  0x00, 0x01, 0x02, 0x03, 0x04, 0x05
};

const unsigned short BLUES[VALUES_NUMBER] = {
  0x09, 0x0A, 0x0B, 0x03, 0x04, 0x05,
  0x00, 0x01, 0x02, 0x06, 0x07, 0x08
};

void setup() {
  pinMode(analogRed, OUTPUT);
  pinMode(analogGreen, OUTPUT);
  pinMode(analogBlue, OUTPUT);
}

void loop() {
  unsigned int counter;
  for (counter = 0; counter < VALUES_NUMBER; counter++) {
    analogWrite(ANALOG_RED_PIN, REDS[counter]);
    analogWrite(ANALOG_GREEN_PIN, GREENS[counter]);
    analogWrite(ANALOG_BLUE_PIN, BLUES[counter]);
    delay(1000); //sleep 1 second
  }
}


user8033: You've got quite an interesting project.
Programming an Arduino (C++)
Arduino is C++ (or atleast a subset).
The Arduino IDE uses the GNU AVR-GCC compiler. And it takes care of all "make" files and stuff. You shouldn't really bother too much. Just paste the code right in, and fix whatever is broken ;)
Also, the Arduino IDE is basically click&install, click&compile/upload, I'm not sure why you're even trying all the other options.

For the sake of clarity/simplicity I'll give you an example of sending a single R/G/B pixel to the Arduino.
Matlab
You should set up your Matlab code something like this.
I'm not a "Matlab guru" nor do I know whatever code you have.
You should open a COM port and write to it.
s = serial('COM1','BAUD',115200);
fopen(s);
Pixel pix = getPixelFromBMP("image.bmp",0);
fprintf(s,'%s',pix.r.to_String()+pix.g.to_String()+pix.b.to_String());
fclose(s);

Arduino
In the Arduino IDE (withouth worrying about makefiles and toolchains).
You do the reverse of what you've done in your Matlab code.
Read the serial input and write it to the LED strip.
I'm quite sure this code won't compile, and there are a lot of fancier ways to read the serial buffer:
#include <ledstrip.h>

LedStrip ledStrip;

int incomingByteR = 0;   // for incoming serial data
int incomingByteG = 0;   // for incoming serial data
int incomingByteB = 0;   // for incoming serial data

void setup() {
        Serial.begin(115200);     // opens serial port, sets data rate to 115200 bps
        ledStrip.begin(1,RGB);    // initializes the ledstrip (RGB).
}

void loop() {
        // send data only when you receive data:
        if (Serial.available() > 3) {
                // read the incoming byte:
                incomingByteR = Serial.read();
                incomingByteG = Serial.read();
                incomingByteB = Serial.read();
                // say what you got:
                Serial.print("I received: ");
                Serial.println(incomingByteR, DEC);
                Serial.println(incomingByteG, DEC);
                Serial.println(incomingByteB, DEC);
                ledStrip.pixel[0].r = incomingByteR;
                ledStrip.pixel[0].g = incomingByteG;
                ledStrip.pixel[0].b = incomingByteB;
                ledStrip.show();
        }
}

C++
So, you don't really need C++ (other than to program the Arduino). You could interchange Matlab for C++ or Arduino for pure AVR C++, but I wouldn't recommend it.

20119: <p>I have Googled quite a lot regarding using a C++ program for uploading to Arduino and related, however I am confused now. Right, my problem is this:</p>

<p>I have written a C++ program which imports RGB data of a 24 bit bitmap (which was generated using Matlab) and now I would like to use this array (3 arrays - R,G,B) for an Arduino sketch to be used for a LED matrix project that I am working on. I am not exactly a programmer and hence had to resort to this path -- MATLAB to c++ and then Arduino, although this could be entirely done in C++ too (importing a bitmap and extracting pixel info). So, my C++ code spits out the 3 arrays and I am not sure how to get those into an Arduino sketch. </p>

<p>I read a lot about this and I understood this - As the Arduino "language" is C and C++ therefore it is possible to program an Arduino in C++/c. I need a maker file and a compiler. However my question is that isn't there a more non-programmer friendly way to get this done, some software or an IDE which supports Arduino programming in C++? I cannot understand much of this method, hence trying to bypass this. </p>

<p>If anybody's got any better method, I would be really glad if you could share it. I am also looking to use the Arduino package for MATLAB to send the array directly from there using serial communication. But I just wanted to make sure I at least tried this path.</p>

<p>Would really appreciate if somebody could offer some help. I am quite stuck here. </p>

<p>Can share any other info if required. </p>

<p>Thanks a lot!</p>

<hr>

<p>EDIT 1:</p>

<p>To clarify as Nick Gammon pointed out in the comments below. In brief steps, this is what I have done till now:</p>

<ol>
<li>Got a 24 bit bitmap (some random image)</li>
<li>Extracted the RGB data for each pixel using Matlab</li>
<li>Have 3 arrays of (for eg.) 122X300 dimensions whose every element has values between 0-255 (8 bit) and for R,G and B colors</li>
<li>Want to get these 3 arrays for use in Arduino sketch for further working</li>
<li>Stuck here - how to do that .....</li>
<li>So I did this - I imported that the RGB data into 3 separate text files and made a c++ program to read those arrays assuming that I should be able to then somehow use this program in Arduino sketch.</li>
<li>Now I am not sure what to do....my goal would be to have these 3 arrays (CRGB arrays, FastLED) in my arduino sketch which I can control and then upload to my Due.</li>
<li>On googling I found that to use c++ for arduino , you need the avr compiler and make file, which I want to avoid. Tried other IDEs too, Eclipse, PlatformIO too .. ummmm ... not that successful to be honest.</li>
<li>as per Paul's ans- Matlab to Arduino method I have to try. 
Hope I have clarified my process till now :)</li>
</ol>

<hr>

<p>EDIT 2: </p>

<p><a href="https://i.stack.imgur.com/euhgC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/euhgC.png" alt="Snapshot of Red color data (122X300) in Text format (imported from Matlab)"></a></p>

<hr>

<p>C++ code for reading the above array (thought I could use the output in Arduino)</p>

<pre><code>#include &lt;stdio.h&gt;
#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;string&gt;
#include &lt;conio.h&gt;
#include &lt;sstream&gt;
#include &lt;stdlib.h&gt;


const int HEIGHT = 4;

const int WIDTH = 5;

using namespace std;

int main(){

  int array_req [HEIGHT][WIDTH];

string userinputprompt, filename;

userinputprompt = "COLORDATA FILENAME: ";

cout&lt;&lt;userinputprompt&lt;&lt;endl;

getline(cin,filename);

ifstream inputfile;

inputfile.open(filename.c_str());

 for (int i = 0; i &lt; HEIGHT; ++i)
{
  std::string tmpString;
  std::getline(inputfile, tmpString);

 std::stringstream ss(tmpString);

 for(int j=0;j &lt; WIDTH; ++j)
  {
    ss &gt;&gt; array_req[i][j];
  }
 }

    for(int p=0; p&lt;HEIGHT; p++)
    {
      for(int q=0; q&lt;WIDTH; q++)
    {
        cout&lt;&lt;array_req[p][q]&lt;&lt;" ";
    }
    cout&lt;&lt;"\n";
}

inputfile.close();
getchar();
return 0;

}
</code></pre>
 10794: <blockquote>
  <p>As the arduino "language" is C and C++ therefore it is possible to program an Arduino in C++/c. I need a maker file and a compiler. However my question is that isn't there a more non-programmer friendly way to get this done, some software or an IDE which supports Arduino programming in C++?</p>
</blockquote>

<p>Yes, it's called the <strong>Arduino IDE</strong>. You plug your board into the USB port, write your program, or use an existing example, and then hit the Upload button.</p>
 7856: <p>Here's a sample program you could use as reference, just replace the values in the array and adjust VALUES_NUMBER accordingly.</p>

<p>Disclaimer: I didn't try to compile/run it, but it should give you an idea of how to use the values you already have.</p>

<pre><code>// These are Arduino Pins that support "analog" output.
const unsigned short ANALOG_RED_PIN = 3;
const unsigned short ANALOG_GREEN_PIN = 5;
const unsigned short ANALOG_BLUE_PIN = 6;

const unsigned int VALUES_NUMBER = 12;

const unsigned short REDS[VALUES_NUMBER] = {
  0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
  0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B
};

const unsigned short GREENS[VALUES_NUMBER] = {
  0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
  0x00, 0x01, 0x02, 0x03, 0x04, 0x05
};

const unsigned short BLUES[VALUES_NUMBER] = {
  0x09, 0x0A, 0x0B, 0x03, 0x04, 0x05,
  0x00, 0x01, 0x02, 0x06, 0x07, 0x08
};

void setup() {
  pinMode(analogRed, OUTPUT);
  pinMode(analogGreen, OUTPUT);
  pinMode(analogBlue, OUTPUT);
}

void loop() {
  unsigned int counter;
  for (counter = 0; counter &lt; VALUES_NUMBER; counter++) {
    analogWrite(ANALOG_RED_PIN, REDS[counter]);
    analogWrite(ANALOG_GREEN_PIN, GREENS[counter]);
    analogWrite(ANALOG_BLUE_PIN, BLUES[counter]);
    delay(1000); //sleep 1 second
  }
}
</code></pre>
 8033: <p>You've got quite an interesting project.</p>

<p><strong>Programming an Arduino (C++)</strong></p>

<p>Arduino is C++ (or atleast a subset).</p>

<p>The Arduino IDE uses the GNU AVR-GCC compiler. And it takes care of all "make" files and stuff. You shouldn't really bother too much. Just paste the code right in, and fix whatever is broken ;)</p>

<p>Also, the <a href="https://www.arduino.cc/en/Main/Software" rel="nofollow">Arduino IDE</a> is basically click&amp;install, click&amp;compile/upload, I'm not sure why you're even trying all the other options.</p>

<hr>

<p>For the sake of clarity/simplicity I'll give you an example of sending a single R/G/B pixel to the Arduino.</p>

<p><strong>Matlab</strong></p>

<p>You should set up your Matlab code something like this.
I'm not a "Matlab guru" nor do I know whatever code you have.
You should open a COM port and write to it.</p>

<pre><code>s = serial('COM1','BAUD',115200);
fopen(s);
Pixel pix = getPixelFromBMP("image.bmp",0);
fprintf(s,'%s',pix.r.to_String()+pix.g.to_String()+pix.b.to_String());
fclose(s);
</code></pre>

<p><strong>Arduino</strong></p>

<p>In the Arduino IDE (withouth worrying about makefiles and toolchains).</p>

<p>You do the reverse of what you've done in your Matlab code.
Read the serial input and write it to the LED strip.
I'm quite sure this code won't compile, and there are a lot of fancier ways to read the serial buffer:</p>

<pre><code>#include &lt;ledstrip.h&gt;

LedStrip ledStrip;

int incomingByteR = 0;   // for incoming serial data
int incomingByteG = 0;   // for incoming serial data
int incomingByteB = 0;   // for incoming serial data

void setup() {
        Serial.begin(115200);     // opens serial port, sets data rate to 115200 bps
        ledStrip.begin(1,RGB);    // initializes the ledstrip (RGB).
}

void loop() {
        // send data only when you receive data:
        if (Serial.available() &gt; 3) {
                // read the incoming byte:
                incomingByteR = Serial.read();
                incomingByteG = Serial.read();
                incomingByteB = Serial.read();
                // say what you got:
                Serial.print("I received: ");
                Serial.println(incomingByteR, DEC);
                Serial.println(incomingByteG, DEC);
                Serial.println(incomingByteB, DEC);
                ledStrip.pixel[0].r = incomingByteR;
                ledStrip.pixel[0].g = incomingByteG;
                ledStrip.pixel[0].b = incomingByteB;
                ledStrip.show();
        }
}
</code></pre>

<p><strong>C++</strong></p>

<p>So, you don't really need C++ (other than to program the Arduino). You could interchange Matlab for C++ or Arduino for pure AVR C++, but I wouldn't recommend it.</p>
