49,761 Topics
| |
my professor has asked us to solve the following problem but im having trouble understanding it **Write a function that takes in a 2 dimensional array of integers and returns the third largest number. Let the number of columns of your 2 dimensional array be 5. Call this function from … | |
Alright so I've been struggling to find the error but I simply can't. Given the following code: #include <iostream> #include <vector> enum ScriptType { SCRIPT_TYPE_CREATURE_SCRIPT, SCRIPT_TYPE_PLAYER_SCRIPT }; class Script { private: ScriptType type; public: Script(ScriptType type) : type(type) { } ScriptType getScriptType() const { return type; } }; class CreatureScript … | |
Can any body have code to make own data types | |
anyone know how to use bubble sort and also binary search ? this program cannot search out the name that user insert. anyone know how to fix it ? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include<iostream> #include<string> #define size 5 using namespace std; struct student { string name; int id; string prog; double cgpa; }; … | |
Hello daniweb, I've been trying to impliment arrow keys into my program, I've found a way, but the problem is I cant figure out how to use the enter key to select an option as follows: pawns: int pawn; system("cls"); pawndd: gotoxy(0,0); SetConsoleTextAttribute(hColor,455); cout<<" RETURN TO PREVIOUS MENU"; SetConsoleTextAttribute(hColor,23); cout<<"\n"; … | |
1. Search Benchmarks Create a New Project called YourLastnameSearch. int array[20] = {78, 45, 33, 1, 6, 41, 99, 54, 73, 28, 101, 60, 21, 82, 11, 15, 654, 36, 52, 70}; Write a program that has an array of 20 integers. (You must use the above array.) It should … | |
After appending an item to a QList which is pointed to by a QMutableListIterator, I find out the next value of the iterator points outside the list. Or can't i point the iterator to any where in the list except the beginning and end? Please i need help. | |
Hello everyone, I have written a code for binary search for my class. My professor asked us to create it using bool, and the header function "bool binarySearch(int a[], int start, int end, int number)". I am having some issues with it. it all seems fine until i get to … | |
Hi All, While executing below code without using assigment operator it works fine , eventhough i have been used pointer values, so any way it must crash as The memory that s2 used to point to was never deleted; it is lost forever as both a and b now point … | |
i insert the different id , but the program out with pointer value anyone know why ??? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include<iostream> #include<string> #define MAX 6 #define size 10 using namespace std; struct student { string name; int id; string prog; double cgpa; }; class stinfo { private: student data[size]; int last; public: … | |
I am first semester student and studiyg CS. I need a c++ project atleast 1000 lines of code. but the project is too simple. I have studied yet Arrays.. | |
Hi, As per below code snippet it is clear that in below class a if we don't introduce assignment operator despite of having pointer values it works fine as memory allocation is done explicitly by declaring s2 object on heap . can anybody suggest, if same canbe achieved without declaring … | |
Problem of sorting the ID in int main. anyone know how to fix the code ? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include<iostream> #include<string> #define MAX 6 #define size 10 using namespace std; struct student { string name; int id; string prog; double cgpa; }; class stinfo { private: student data[size]; int last; public: stinfo(); … | |
Okay so I have all of the coding and logic down except for ONE little part. I can not figure out how to actually implement my functions into the main because I keep getting errors that have to do with pointers. Please help! The point of the program is to … | |
#For only biegeners PLease #I hope this post was good when # when any help for biegeners | |
anyone know what is this error , how to fix it ??? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include<iostream> #include<string> #define MAX 6 #define size 10 using namespace std; struct student { string name; int id; string prog; double cgpa; }; class stinfo { private: student data[size]; int last; public: stinfo(); void selectionSort(int A[]); void … | |
hey guys this c++ code which needed to convert to asm and when user enter 2000 the clock shoud show lest then 5 sec.... for (a=0; a<=y; a++) for (b=0; b<=y/2; b++) for (c=0; c<=y/3; c++) if ((a + 2*b + 3*c) == y) count++; this is the question -finds … | |
Hi, I have inherited a pair of applications: a client.exe and a server.exe. They run on different PCs and communicate through TCP/IP. The server comes with an OCX file: server.ocx. The client has its own OCX file: client.ocx. (I suspect there could be a mismatch between the two ocx files.) … | |
Does anyone know how to call a binary executable file from another program. I have a simple binary file which can take command line arguments called **InputProgram.exe**. I have made another program of which I want to call InputProgram from and pass it an argument. Not this is going to … | |
Guys..My task is to convert for loop c++ to asm....and the speed shoud be fast....i managed to convert to asm the loop part but when i run and enter 2000 it shows 33 second is it possible to be lower the 5 second.... #include <iostream> #include <ctime> using namespace std; … | |
Hi everybody I need some professional help from experienced people. I am writing a program in C++ about a game. I have to specify a class Questions with attributes question, answers and difficulty. In the program i should have methods add, edit, select, search, print and remove. The problem that … | |
for (a=0; a<=y; a++) for (b=0; b<=y/2; b++) for (c=0; c<=y/3; c++) if ((a + 2*b + 3*c) == y) count++; | |
How do we create datatypes in C++. Eg. creating datatype called "myowndatatype" with sizeof(myowndatatype) = 3 | |
`Hello and thanks for reading my post. I am trying to develop a program that will select a file for opening based on user input. I did have this code working at one point but no longer. I am a beginner at C++ so I am trying to learn from … | |
Hello I'm using the book C++ Primer 5th edition and in the beginning there is an exercise to change a sum into a prodcut. #include <iostream> int main() { std::cout << "The sum of " << v1 << " and " <<v2 << " is " << v1 + v2 … | |
As the title says, it's a simple trie class written in C++11. The only operations implemented are insert, remove, and search (both prefix and exact matches). I sort of abandoned the test/debug process, and while I'm somewhat confident that there aren't any serious bugs, I can't guarantee it. Use this … | |
If the prototype of my function is void sell_item(store **head,store **tail). In main i've passed sell_item(&head,&tail), where head & tail where both pointers of store(struct) type. Now I want to access the the content where head is pointing to. How shall I access it? Like *head->next??? But this is not … | |
#include<iostream> #include<string> #include<vector> #include<algorithm> #include <cstdlib> using namespace std; int main() { char s[5]; string g; int p=345; sprintf(s,"%d",345); g=s; g+=".mp3"; cout<<g<<endl; getchar(); return 0; } I have a very small doubt about strings. this is code snippet i have shown. when i have called sprintf(), then it has changed … | |
This is a homework assignment. I am in a Software Engineering class and we have to implement a change request in a group project. My group chose Winmerge, and my change request is to do the following: 1.) Set the divider to reset to the middle on double-click. 2.) Allow … | |
| am using dev c++ updated version for my project am using myql c api problem is when i run my application it stop and says that mysql.dll is missing , currently when i place mysql.dll in the app folder it cant give me the error , so i want to … |
The End.