Reply
  • Dec 1, 2020
    ·
    1 reply
    New NIGHTMAN

    oooo its gonna f*** up cos of ktt formatting

    Use pastebin

  • Dec 1, 2020
    ·
    1 reply
    New NIGHTMAN

    @op follow me and i can send it in messages if not

    Preciate u my brada I followed u

  • Dec 1, 2020
    the end

    Use pastebin

    Ohhh yeah

  • Dec 1, 2020
    I AM LOVE

    Preciate u my brada I followed u

    2 mins ill put it in paste bin

  • Dec 1, 2020
    ·
    1 reply
    tunemoon

    OP gotta pay a bag to get this s*** done. Thought it be some simple Hello World s*** but nah this requires some more work

    Uni profs are f***in krazy we in a middle of a panoramic and they stay giving us these type assignments

  • u gotta tap into the mainframe bro

  • rotate the satilites

  • Dec 1, 2020

    C++ is such a b****

  • Dec 1, 2020
    I AM LOVE

    Uni profs are f***in krazy we in a middle of a panoramic and they stay giving us these type assignments

    Panoramic

  • Dec 1, 2020

  • Dec 1, 2020

    Out of the endless resources on the internet you choose the KTT 2 music section to try and get help

  • stackexchange bro stackexchange

  • Dec 1, 2020
    ·
    1 reply
    met

    Thread needs @Valenciaisthebest

    Mr Fwesh in the Building!!!

  • Valenciaisthebest

    Mr Fwesh in the Building!!!

    *Fresh

    where my editors at?

  • Dec 1, 2020
    ·
    1 reply

    @op

    ok here's the linked list stuff
    you just need to change the name of the List class to macth your question
    pastebin.com/6iaMmD7x

  • Dec 1, 2020
    New NIGHTMAN

    #include //delete space between io stream
    #include <assert.h>

    class Node {

    public:
    int item;
    //set node to nullptr or it will be free memory cdcdcdd
    Node* next = nullptr;
    };

    class List {
    private:
    Node* first = nullptr;

    public:
    void addFront(int i)
    {
    if (isEmpty())
    {
    first = new Node;
    first->item = i;
    }
    else {
    Node *n = new Node;
    n->next = first;
    first = n;
    first->item = i;
    }
    }

    bool isEmpty()
    {
    	return first == nullptr;
    }
    
    int size()
    {
    	if (isEmpty())
    	{
    		return 0;
    	}
    	else
    	{
    		int counter = 1;
    		Node *n = first;
    		while (n->next != nullptr)
    		{
    			counter++;  
    			n = n->next;
    		} 
    		return counter;
    	}
    } 
    
    void removeFront()
    {
    	if (!isEmpty())
    	{
    		Node *n = first;    
    		first = first->next;
    		delete n;          
    	} 
    }
    
    void clear()
    {
    	while (!isEmpty())
    	{
    		Node *n = first;
    		first = first->next;
    		delete n;
    	}
    }
    
    ~List() { clear(); }
    
    bool contains(int i)
    {
    	if (isEmpty())
    	{
    		return false;
    	}
    	else
    	{
    		bool cont = false;
    		Node *n = first;
    		while (n->next != nullptr || cont != true)
    		{
    			if (n->item == i)
    			{
    				cont = true;
    			}
    			n = n->next;
    		}
    		return cont;
    	}
    }
    
    int getAt(int pos)
    {
    	assert(pos >= 0);
    	assert(pos < size());
    	
    	int counter = 0;
    	Node *n = first;
    	
    	while (counter <= pos)
    	{				
    		if (counter == pos)
    		{
    			return n->item;
    		}
    
    		counter++;
    		n = n->next;
    	}
    
    	assert(false); // should never get here
    	return -999999999;
    }

    };

    int main()
    {
    //List numbers;
    //std::cout << numbers.size();
    //std::cout << numbers.isEmpty();
    //numbers.addFront(3);
    //std::cout << numbers.size();
    //std::cout << numbers.isEmpty();
    //numbers.addFront(2);
    //numbers.addFront(1);
    //std::cout << numbers.size();
    //numbers.removeFront();
    //std::cout << numbers.size();
    //numbers.clear();
    //std::cout << numbers.size();
    //numbers.addFront(2);
    //numbers.addFront(3);
    //numbers.addFront(2);
    //std::cout << "\n\n\n";
    //std::cout << numbers.contains(3);

    List numbers;
    numbers.addFront(3);
    numbers.addFront(2);
    numbers.addFront(1);
    
    for (int i = 0; i < numbers.size(); i++)
    {
    	std::cout << numbers.getAt(i) << ' ';
    }
    
    system("pause");
    return 0;

    }

    Take a look y'all

  • Dec 1, 2020
    New NIGHTMAN

    @op

    ok here's the linked list stuff
    you just need to change the name of the List class to macth your question
    https://pastebin.com/6iaMmD7x

    Much love bro shout outs to you

  • sabbaroni 🧔🏻
    Dec 1, 2020
    ·
    1 reply
    New NIGHTMAN

    oooo its gonna f*** up cos of ktt formatting

    @op can hit View Source with the … by your post & see the actual text

  • Dec 1, 2020
    ·
    1 reply
    sabbaroni

    @op can hit View Source with the … by your post & see the actual text

    when i saw the notification i thought you were gonna tell me i cant be posting his hw and that im muted

  • sabbaroni 🧔🏻
    Dec 1, 2020
    ·
    1 reply
    New NIGHTMAN

    when i saw the notification i thought you were gonna tell me i cant be posting his hw and that im muted

    @ANGELOFDEATH

  • Dec 1, 2020
    ·
    1 reply

    man thank god i'm over with C++

  • Dec 1, 2020
    sabbaroni

    @​ANGELOFDEATH

  • Dec 1, 2020
    ·
    1 reply
    Zebulon

    man thank god i'm over with C++

    RT lol other languages so much nicer to use

  • Dec 1, 2020
    ·
    2 replies

    bro posted the whole assignment