Wendy
A writing a function that will ask the user to input two number and add it together and the result to generate for loop
Wendy
The help I need is while result is updating I want it to stop at the number that the user input and show me this is the first number the user input ad second number
Wendy
In c++ code block
Anonymous
If you write one more time, I'll punish you
z
The help I need is while result is updating I want it to stop at the number that the user input and show me this is the first number the user input ad second number
Stupid!, we don't do your homework, that's not how people should behave in programming forum. If you want to ask about the code, show your code and what effort you have made, explain specific part you are in trouble.
Anonymous
For what
Try read rules
Wendy
OK I will send the code so you will see it
Anonymous
If no one will help, that is fine
Dark
int result = 0; int result = new int *[r]; for (int **i = result; i < result + r; i++) *i = new int[c]; for (int i = 0; i < r; i++) { for (int j = 0; j < c; j++) { *(*(result + i) + j) = *(*(Array_1 + i) + j) + *(*(Array_2 + i) + j); } } return result;
Dark
Please help me how to iterate this with pointer iterators without integer iterators
Dark
int ** result = 0 correction.
Anonymous
Use std::vector
Dark
I can't due to some rules
Dark
set by instructor
Anonymous
set by instructor
Fire him He is bad
Dark
I can't use subscript....
Dark
I know how to use subscript but he asked me to iterate this with pointers only
Anonymous
Your instructor should not teach
Dark
I will send you his mail id so you can contact him personally
Dark
But can you help me to figure out this problem
z
int result = 0; int result = new int *[r]; for (int **i = result; i < result + r; i++) *i = new int[c]; for (int i = 0; i < r; i++) { for (int j = 0; j < c; j++) { *(*(result + i) + j) = *(*(Array_1 + i) + j) + *(*(Array_2 + i) + j); } } return result;
Something like this // what are c and r? int **result = new int *[r]; int **result_end = result + r; int *tmp, *tmp_end; uintptr_t diff, i, j; while (result < result_end) { tmp = new int[c]; tmp_end = tmp + c; *result++ = tmp; diff = ((uintptr_t)result_end - (uintptr_t)result) / sizeof(*result); i = (uintptr_t)r - diff; while (tmp < tmp_end) { diff = ((uintptr_t)tmp_end - (uintptr_t)tmp) / sizeof(*tmp); j = (uintptr_t)c - diff; *tmp++ = *(*(Array_1 + i) + j) + *(*(Array_2 + i) + j); } } return result;
z
Untested. If I were you, I would write the simplified version, and then test this shit against the simplified one.
Dark
It's a function
Sherlock
stringstream s(str); // Used for breaking words how is this statement able to break str into words??
Igor🇺🇦
Roxifλsz 🇱🇹
/ban bot
klimi
Haha
Srinu
/ban
Anonymous
Please i need help
Diego
What does this mean then?
doc and docs is jargon for documentation regarding a specific technology, covering how to use it, how is it made, how and why does it work, etc.
Diego
Well, usually they don't include all those details, but you get what I mean
Anonymous
Please i need help
The Ghana Navy has been paying its newly employed staff on ‘table-top’, a practice that has attracted much criticism from the military command. On a trial basis they have engaged your services to design a payment system with the following functionalities a. Request for only name and rank to be entered into the system. b. Use the table below to compute the net-salary which is Gross Salary – Tax Name Rank Gross Salary Tax (% of Gross Salary) Net Salary Sargent 2500 2.7 Major 4800 5.8 Captain 6800 8.3 c. Display results d. Explain how your code can be modified to request for at least 10 inputs before it computes the results Anyone to explain to me Am a beginner
g3rm4n
Hey guys, I have a constructor that fill the details of two players. I’ll need to random generate the first player in a game. The player in 0 place or a player in a second place. That’s my code here https://github.com/KfirGerman/TicTacToe/blob/master/Game.cpp
Pavel
Hey guys, I have a constructor that fill the details of two players. I’ll need to random generate the first player in a game. The player in 0 place or a player in a second place. That’s my code here https://github.com/KfirGerman/TicTacToe/blob/master/Game.cpp
I don't get the question. By the way: In your case it's better to pass names as const char* not just char*, because otherwise it implies that you can modify the name inside the constructor. int count = board_play.count_board(), move; it's better to split long declarations into separate lines, one for count, one for move. Also count may be not very good name (count of what?). As well as some other names.
Pavel
Thank you Pavel for your help every time when I’ll need it. I change it my code. I’ll think to make if statement that check if player[random].get_symbol() == ‘X’ {something} else {something else}.
Not sure what random means in this code snippet. If you want to check whether it's an AI player or human player you can make a bool for that. Or even use Inheritance to implement two different behaviors for those players: e.g. abstract PlayerLogic and concrete HumanPlayerLogic, AiPlayerLogic and put the logic that is different inside them
Anonymous
I want some person who can do my data structure assignment
Anonymous
Or can help me
Anonymous
I want some person who can do my data structure assignment
Go to Fiverr , search for programmers , pay them money to do your homework.
jwhan
Hey, guys. Why the function polyadd() is right? I think the last element of the poly1 and poly2 will be missing. Here is the program: https://www.geeksforgeeks.org/adding-two-polynomials-using-linked-list/
jwhan
In the first while loop will break after the poly1 or poly2's pointer point NULL, but it did nothing to the last element
jwhan
Who can tell why my deduction is wrong
Dev
How to merge audio and video using cpp is there any good library available?
Anonymous
EE department of UOL wants to keep a record of students Marks who are repeating the Data Structure and Algorithm course in Summer 2020. You are required to design a software which takes student name and Marks in DataStructure Course and inserts the info in a record utilizing the following Data Structures.  Stack  Queue  Linked list Bonus Steps: • Find the student with Maximum marks and print his/her Name and position in linked list .
Anonymous
I have a function that takes std::function as an argument. Is there a way I can pass a function object or lambda without explicitly wrapping them into std::function?
MAC
What ? In electrical engineering, is there structure and algorithm?
https://en.wikipedia.org/wiki/Boolean_algebra
Anonymous
A bot?
MAC
A bot?
it's answer
MAC
A bot?
on your question
Anonymous
Wtf?
Anonymous
More exactly?
MAC
More exactly?
There are algorithms and structures in electrical engineering
Anonymous
There are algorithms and structures in electrical engineering
Ok . I think It is computer engineering or software engineering.
MAC
Ok . I think It is computer engineering or software engineering.
algorithms and structures are notion of math, they're everywhere
Jasur Fozilov 🐳
/get cppbookguide
Jasur Fozilov 🐳
/get cbook
Jasur Fozilov 🐳
/get ide
K A L V I N
/get
K A L V I N
/info
Sasitha
C++ expert, i want help
Anonymous
C++ expert, i want help
No, you don't
MRT
in qt this-> deletelater() not working !;
MRT
MRT, [28.03.21 21:56] QThread *_th = new QThread(); MyClass *cl = new MyClass(socket,_data,_th); //MyClass objects private: QTcpSocket *socket; ClientBufferHandle *buff; AesEncrypto* crypto; int _isRunning; QVector<QString> const *userData; MyClass::MyClass(QTcpSocket *soc,QVector<QString> const *_userData,QObject *parent) : QThread(parent),socket(soc),buff(new ClientBufferHandle(this)),crypto(new AesEncrypto()),_isRunning(true),userData(_userData){} void MyClass::disconnected(bool soc){ if(soc){delete socket;} delete buff; delete crypto; delete userData; this->setParent(nullptr); this->deleteLater(); exit(0); }