49,761 Topics
| |
We follow debugging with writing debug logs in the file to find any bugs in vc++ and visual studio. Is there any other better way doing the same. Thanking in advance | |
This snippets contains a python program to find a shortest solution to the problem of the farmer who whishes to cross a river. The boat can only contain two things, including the rower. The farmer comes with a wolf, a duck and a bag of corn, and he can't leave … | |
A farmer with his wolf, duck and bag of corn come to the east side of a river they wish to cross. There is a boat at the river’s edge, but of course only the farmer can row. The boat can only hold two things (including the rower) at any … | |
void Selection_Sort(int SUM_1[], int n){ int Lid, tmp; for (int i = 0; i < n - 1; i++){ Lid = i; for (int j = i + 1; j < n; j++){ if (SUM_1[j] != 0 && SUM_1[Lid] != 0 && SUM_1[j] < SUM_1[Lid]){ Lid = j; } tmp … | |
I have a project that uses DirectSound to play streaming sound. I use SetThreadpoolWait to get a threadpool callback every time the notification (AutoReset) events are signalled. (To fill the streaming buffer with more audio). The new Win7 threadpool API requires you to use SetThreadpoolWait to schedule a new wait … | |
| Hi, everyone! I have to make a function which would get a c-string of an inputted text and it would output the number of times each unique word occurs in it. Of course, I must use c-strings [yeah yeah, I know but that is what the assignment is]. Here's my … |
Hi All, Below is the code of implementation of aggregation in c++. In this code class bar object will be contained in class a but class a won't act as a owner of class bar and due to this bar object is deleted after class a's life time ends. Now … | |
Help me please! below is a part of the code which causes the error. int B[996]; for (j = 0, k = 0; j < (N / 6); j++){ if (A[j] == 0){ continue; } B[k++] = A[j]; } //팀원이 여섯명인 팀만의 순위대로 저장한 배열을 새로 만듭니다. int SUM[167] = … | |
Hi All, In below code i am surprised to see destructor for rectangle class is not being called though base class destructor for IShape is virtual. below is the output of below programme: draw the rectangle draw the circle draw destructor deleting circle **deleting the Rectangle** is missing from output … | |
How to write a C++ program doing the following : a series of names with no blank characters and displays the number of the names having more than ten charaters. the name must not exceed 25 characters and the series ends when the user enters the word "end". | |
| Hi everyone. I was reading some source code and I cam across the line `cout << "\nu converted to upper case is " << static_cast<char> ( toupper('u') ) << endl;` Why would the programmer use static_cast<char> in conjunction with toupper to print 'U' instead of just typing `cout << "\nu … |
#include<iostream> #include<stack> using namespace std; struct node #include<iostream> #include<stack> using namespace std; struct node { int data; node *left; node *right; }; class usman { private: node *root,*leaf; int count; public: usman(); //~usman(); bool input(); void call(); void preorder(); void postorder(); }; usman::usman() { root=leaf=NULL; count=0; } bool usman::input() { … | |
hy ,i make binary tree,the input of binary tree in correct.but issues traversing of binary tree using stack ,because the result of traversing is wrong .please solve this issues. #include<iostream> #include<stack> using namespace std; struct node { int data; node *left; node *right; }; class usman { private: node *root,*leaf; … | |
Can someone check if I got these correct please?? I'm pretty sure I missed almost half of these so I really need help on these. If someone can explain how to get an answer, that would be great. a: 5 b: address of location of x (0x....) c: address of … | |
It has been a long time since i do C++ programming and I am stuck on this question. I don't remember how to solve this kind of question. haha Part 1: Develop a C++ program which asks the user for the choice of either 3x3 or 4x4 2-dimensional array (use … | |
I need to write a program to create palindrome words by using the string entered by users. The program should have 2 strings: the first string is used to store input text from the user and the second string is to store the same input text from the user in … | |
I need to read from a txt file and then pass that array into another function which prints the data in a neat organised manner depending which type pf book it is... So if its audiobook then the book is listed under audiobook, if ebook then under ebook etc... I … | |
I make a program to simulate the Shortest Job First algorithm in CPU scheduling .. this function will calculate the start , end, turn,and wait time for each proccess according to Non-preemptive way .. the 1st condition gonna check for the 1st arrival time or the smallest burst time .. … | |
Hello I've problem with reading a text file and using it in textbox and combobox combination. I've got text file ( which I open easly ) where the data is presented like this: > English cat dog cow > French chat chien vache What I want to do is to … | |
How do I modify minhook in order to be able to hook undocumented functions? I'm a beginner and this is beyond me. | |
Hi, I have a hooked function, NtTerminateProcess. I am trying to get the full path to the process handle passed to TerminateProcess. The injected app is taskmgr and GetProcessImageFileName is returning ERROR_ACCESS_DENIED. I even tried opening another handle to the process to ensure I have the required access rights, like … | |
Hi All, In below design i would like to know the appraoch of deletion of base class pointer .It is pritty clear that deletion of base class object obj won't take place inside Draw destructor. Apart from this same code i have tested using unique_ptr and as expected it is … | |
Hi All, In below code i am performing search in map through key value but not able to get the desire results though common elements (intersection) is present in both lists. #include <iostream> #include <stdio.h> #include <stdlib.h> #include <map> using namespace std; struct node { int data; struct node* next; … | |
I tried here in this code to insert struct information then assign to vector and get the smallest age .. i want to do that with vector to learn more about it .. can anyone help me to fix it .. and explain to me what's wrong in my thought … | |
I am new to c++ and puzzle about parameters and argument definitions,Please help me i will great thankful to Dani web members. | |
Hi every one, I had implemented Karatsuba algorithm in C++, but I have been stuck for 2 days. First problem is the function give incorrect answer, second problem is it oftens crash when run (runtime error). I try to debug but cannot understand how it's not work. I hope someone … | |
Test Scores #2 Modify the program of Programming Challenge 2 to allow the user to enter name-score pairs using two parralell arrays. For each student taking a test, the user types the student’s name followed by the student’s integer test score. Modify the sorting function so it takes an array … | |
void Halt (); void Reply (const char * num,uint8_t stat); { this is the error message for this code 7|error: 'uint8_t' has not been declared 9|error: expected unqualified-id before '{' token | |
anybody tell me please what is wrong in this code it will give me only blank console screen? #include <iostream> using namespace std; int main() { int x=1; int y=2; int z; while(x<=50) { while(y<x) { z=x%y; if(z==0) { cout<<x<<"is a prime number"<<endl; } else { y++; } } x++; … | |
The End.