Segmentation fault with strcmp and copied char data
<p>I am working on an assignment and I keep getting segmentation fault in the following code from <code>main</code> that we are not allowed to change:</p>

<pre><code>char signal[61];

Seti t2A(data, rF, rA, rB); // call constructor

t2A.getMessage(signal);            // calling member functions
t2A.getRanges(&amp;pA, &amp;pB);

usrF = t2A.getFrequency( );

if(strcmp(signal, correct)) { // &lt;-- this is where i get segmentation fault.
</code></pre>

<p>The implementation of the <code>Seti</code> class:</p>

<pre><code>class Seti {
    char signal[61];
    int freq;
    int a, b;
public:
    Seti(const char [ ], int, int, int);
    Seti();
    int getFrequency( );
    void getRanges(int *, int *);
    void setRanges(int , int );
    void getMessage(char *);
    bool replaceChar(int , char );
    bool copyPrimes(char *);
    bool copyFibonacci(char *);
    int initCap( );
    friend Seti join(Seti, Seti);
};
</code></pre>

<p>And the implementation of <code>getMessage</code>:</p>

<pre><code> void Seti::getMessage(char *pSignal) {
 strcpy (pSignal, signal);
 return;
 }
</code></pre>

<p>Why am I receiving a segmentation fault after that if statement in the main?</p>
