49,757 Topics

Member Avatar for
Member Avatar for eclipsethemoon

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 …

Member Avatar for tinstaafl
0
139
Member Avatar for capton

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.

Member Avatar for capton
0
135
Member Avatar for helloworld1234

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 …

Member Avatar for helloworld1234
0
163
Member Avatar for can-mohan

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 …

Member Avatar for ravenous
0
269
Member Avatar for on93

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: …

Member Avatar for deceptikon
0
148
Member Avatar for nabeelkhanjadoon10

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..

Member Avatar for DoRight
0
6K
Member Avatar for can-mohan

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 …

Member Avatar for Lucaci Andrew
0
267
Member Avatar for on93

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(); …

Member Avatar for on93
0
156
Member Avatar for izabella.pearson

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 …

0
96
Member Avatar for BARI DANIYAL
Member Avatar for NathanOliver
-1
164
Member Avatar for on93

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 …

Member Avatar for Banfa
-1
559
Member Avatar for alanso

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 …

0
119
Member Avatar for Chuck2013

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.) …

Member Avatar for Ancient Dragon
0
296
Member Avatar for daino

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 …

Member Avatar for daino
0
714
Member Avatar for alanso

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; …

Member Avatar for Banfa
0
418
Member Avatar for spawn2004

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 …

Member Avatar for Lucaci Andrew
0
189
Member Avatar for falcan
Member Avatar for Banfa
0
51
Member Avatar for chound

How do we create datatypes in C++. Eg. creating datatype called "myowndatatype" with sizeof(myowndatatype) = 3

Member Avatar for ravenous
1
269
Member Avatar for Tonyi1

`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 …

Member Avatar for Tonyi1
0
350
Member Avatar for Kareem Klas

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 …

Member Avatar for deceptikon
0
151
Member Avatar for deceptikon

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 …

Member Avatar for deceptikon
3
405
Member Avatar for MRehanQadri

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 …

Member Avatar for MRehanQadri
0
166
Member Avatar for nitin1

#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 …

Member Avatar for Moschops
0
160
Member Avatar for greatman05

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 …

Member Avatar for Ancient Dragon
0
195
Member Avatar for nova37

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 …

Member Avatar for Ancient Dragon
0
188
Member Avatar for nicholasamh

Hi, I am using visual studio 2008, C++ MFc. I have create 2 edit box. I will let user key in at the editbox1. Then i will get line and paste what user have key in to editbox2. I want it to be something like hyper terminal format. That mean …

Member Avatar for ningappa
0
210
Member Avatar for J-P1988

Hello, When i compile i get theses undefiend reference to extern lobal variable. In my code, i try to do an file that define it and extern it on SystemeBataille.cpp call th definitor on main.cpp but same error. If i place my extern on an specific function exemple SystemeBataille::placeExternHere i …

Member Avatar for J-P1988
0
6K
Member Avatar for ConfusedLearner

Show the hex addresses and variable values after the statements have been executed. (All pointers are 4 bytes!) The first byte of memory below is xFF2A. Not too sure if I am doing this right. Please help. Thanks. t s r q x d c b a 8 8 4 …

Member Avatar for raptr_dflo
0
217
Member Avatar for niario

I tried to create an hourglass with asterisk characters using 'for' loop... both decrement and increment works fine, but I got stucked with text alignment where those asterisks supposed to be printed in the center and justified to bring an hourglass look instead of being sticked to left or right …

Member Avatar for raptr_dflo
0
445
Member Avatar for nitin1

#include<iostream> #include <cstdio> #include<string> using namespace std; typedef struct node node; struct node { int value; node * child[26]; }*root; node * newnode() { node * nn; nn=(node*)malloc(sizeof(node)); nn->value=0; for(int i=0;i<26;i++) { nn->child[i]=NULL; } return nn; } bool insert(string s) { node * temp=root; bool xx=false; for(int level=0;level<s.length();level++) { int …

Member Avatar for deceptikon
0
129

The End.