ANYONE GOOD AT C++ BRUH I NEED HELP WITH AN ASSIGNMENT BRUH I WILL PAY YOU I NEED HELP I REQUIRE ASSISTANCE HELP BRUH
OBJECT ORIENTED PROGRAMMING C++
give a quick assignment summary
yo i can help you. just gotta get the money up front if thats all good with you? ๐
yo i can help you. just gotta get the money up front if thats all good with you? ๐
people offered to help OP and he MIA
deadline must have already passed lolololol
Bro is asking for hw help in f***ing music sxn how desperate can you get
Yeah bro we only good for predicting charts and fw sales
Other than that were useless
Yeah bro we only good for predicting charts and fw sales
Other than that were useless
question 1
question 2
i got some linked list stuff from last year not sure if its exaclt what you need
#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;
}
these niggas hacking the site
@op follow me and i can send it in messages if not
Thread needs @Valenciaisthebest
@op wait actually that should work regardless of of the ktt formatting
just copy and paste it all and add iostream to the top include
and all the commented s*** in main is just for testing
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