Complete Singly Link List C++ #include &lt;iostream&gt;
using std::cout;
using std::endl;

class SinglyLinkedList
{
    struct SLL
    {
        int data;
        SLL* next;
    };

    SLL *head;

public:
    SinglyLinkedList()
    {
        head = NULL;
    }

    SLL* createNewNode()
    {
        SLL *newNode = new SLL;
        newNode-&gt;next = NULL;
        newNode-&gt;data = -1;

        return newNode;
    }

    void printLL()
    {
        SLL *temp = head;

        while(temp)
        {
            cout &lt;&lt; temp-&gt;data &lt;&lt; " ";
            temp = temp-&gt;next;
        }

        cout&lt;&lt;endl;
    }

    void insertAtBeginning(int n)
    {
        insertAtPos(n,0);
    }

    void insertAtEnd(int n)
    {
        insertAtPos(n,0xFF);//max position so that it will add to end
    }

    void insertAtPos(int n, int pos)
    {

        if(pos &lt; 0)
            return;

        SLL *newNode = createNewNode();
        newNode-&gt;data = n;

        if(head == NULL)
        {
            head = newNode;
            return;
        }

        int i = 0;
        SLL* temp = head;
        SLL* prev = temp;
        while(temp-&gt;next &amp;&amp; i&lt;pos)
        {
            i++;
            prev = temp;
            temp = temp-&gt;next;
        }

        if(temp-&gt;next == NULL)
        {
            temp-&gt;next = newNode;
        }

        else
        {
            newNode-&gt;next = temp;

            if(pos == 0)
                head = newNode;
            else
                prev-&gt;next = newNode;
        }
    }

    void deleteAtPos(int pos)
    {
        if(head == NULL)
            return;

        int i = 0;
        SLL* temp = head;
        SLL* prev = temp;

        SLL* nodeToDelete = NULL;

        if(pos == 0) //delete head node
        {
            nodeToDelete = head;
            head = head-&gt;next;

            delete nodeToDelete;
        }

        else
        {
            while(i&lt;pos)
            {
                i++;
                prev = temp;
                temp = temp-&gt;next;
            }

            nodeToDelete = temp;
            prev-&gt;next = temp-&gt;next;

            delete nodeToDelete;
        }
    }

    void deleteLL()
    {
        SLL *temp = head;

        while(temp)
        {
            temp = head;
            head = temp-&gt;next;

            delete temp;

            temp = head;
        }

        cout&lt;&lt;endl;
    }

};


int main(int argc, char* argv[])
{
    SinglyLinkedList ll;

    //test cases
    ll.insertAtEnd(1);
    ll.insertAtEnd(2);
    ll.insertAtEnd(3);
    ll.insertAtEnd(4);
    ll.insertAtEnd(5);
    ll.insertAtEnd(6);

    ll.printLL();

    ll.insertAtBeginning(11);
    ll.insertAtBeginning(22);
    ll.insertAtBeginning(33);
    ll.insertAtBeginning(44);
    ll.insertAtBeginning(55);
    ll.insertAtBeginning(66);
    ll.insertAtBeginning(77);

    ll.printLL();

    ll.insertAtPos(0,1);
    ll.insertAtPos(4,1);
    ll.insertAtPos(2,1);
    ll.insertAtPos(5,1);
    ll.insertAtPos(1,1);

    ll.printLL();

    ll.deleteAtPos(0);
    ll.deleteAtPos(4);
    ll.deleteAtPos(2);
    ll.deleteAtPos(5);
    ll.deleteAtPos(1);

    ll.printLL();

    ll.deleteLL();

    ll.printLL();

    return 0;
}
Main Flaw
You have committed the biggest C++ sin. You have a class that contains an owned pointer SLL *head; but you have not done any of the resource management.
Please look up the rule of three.
Currently your code is just broken because you forgot this. Currently any copy of the object (through the compiler generated copy constructor or assignment operator) will mean both objects are using the same underlying list. Thus updates to one will update the other.
You don't have a destructor so your objects just leak memory when they go out of scope.
Interface
Why are you exposing the SSL internal object via a public API?
SLL* createNewNode()

This is just a bad idea. Your container contains int objects the user of your object does not need to know about SSL objects. This leakage of scope is a massive problem in terms of maintainability.
Code Review
Don't do this in header files.
using std::cout;
using std::endl;

If I include your header in my code you change the behavior for me. cout and endl may seem benign but it general it is a bad habit. If you want to do confine it to the closest scope you can.
Sure have a print method.
    void printLL()

But why not pass the stream you want to print on as a parameter (you can even default to std::cout).  But the main way to print in C++ is to use operator&lt;&lt;() so you should define this (and just make it call printLL).
Prefer &quot;\n&quot; over std::endl. The only difference is the extra flush. There is no need to flush any buffers. The default built in automatic flushing will flush ehenever you need. Any extra flushes that you do will just make the code less effecient.
        cout&lt;&lt;endl;

Your list seriously has a limit of 255 elements!
        insertAtPos(n,0xFF);//max position so that it will add to end

also 0xFF is not the maximum value that an int can hold. You may want to look up a better value.
Wht does SSL not have a constructor that takes the data value?
        SLL *newNode = createNewNode();
        newNode-&gt;data = n;

This could have been written much easier with:
        SSL* newNode = new SSL(n); // SSL constructor does the rest of the work.