49,757 Topics

Member Avatar for
Member Avatar for c++lover

hi, im working on josepus problem but this programe is not working well it is working in unlimited loop any one can point out the mistakes????????? #include<iostream> using namespace std; class node { private: int object; node *nextnode; public: int get(){return object;}; void set(int object){this->object=object;}; node *getnext(){return nextnode;}; void setnext(node …

Member Avatar for chrjs
0
111
Member Avatar for magravis

Hello, So I have a .txt file which is kind of built like: N 1234554321 Joe Jones Y 1234555432 Sarah Clark Y 1234321231 Kirah Williams N 1234212321 John Johnston The output, line by line, as the txt file is, and it works and all, I output "Y" or "N" I …

Member Avatar for VernonDozier
0
138
Member Avatar for sergent

Hello, I am making a program where you are entering 2 numbers which should be product AND sum of other 2 numbers. The program then outputs what are the other 2 numbers. For example if I enter sum 13 and product 22 the program will output 2 and 11. But …

Member Avatar for sergent
0
124
Member Avatar for hous3aholik

Hi! I need some guidance on this project. I wrote most of it, but i would like to improve my code by implementing more functions, and im open to hear suggestions on my code. My main concern is, every time the user picks one of the drinks it should subtract …

Member Avatar for hous3aholik
0
176
Member Avatar for lochnessmonster

[code]// header moduleinjector - header for class moduleinjector itself // as well as "core" moduleinjector-related functionality namespace Injection { class moduleinjector {...}; ... // ... = core related functionality e.g. non member functions almost all clients need ... } [/code] when you construct a moduleinjectior object you must pass in …

Member Avatar for mike_2000_17
0
124
Member Avatar for CodyOebel

Ok.. this is actually regarding game hacking, but I wish to gain knowledge from this procedure. Here is the scenario. The game is a server based multiplayer role playing game in basic 2d form. What I want to be able to do is simply manipulate what I see. For example.. …

0
66
Member Avatar for jamesl22

Hi, I am writing an FPS game in C++ using OpenGL. I am trying to write the crouch system but I want to make the crouch more smooth. At the moment you press the crouch key the character immediatly moves down. Here is the code: Crouch Down: [CODE] entity[0].crouching = …

Member Avatar for jamesl22
0
276
Member Avatar for eddieee

i am new to programing, i installed borland 5.5.1 c++ compiler so i practice my self.But i got some problems trying to compile, i dont know if the problem is from the i installed the compiler or something else. Below are the program i wrote and their compilation error. program …

Member Avatar for WaltP
0
221
Member Avatar for KazenoZ

Hello, I've finally come to a point when I want to send my program over to some people to test, however, I've run into problems on that. This is my first time writing a program in managed code(C++\CLR), and so far, all I had to do was pack the redistributional …

Member Avatar for KazenoZ
0
251
Member Avatar for hawita

Help plz i am very confused :( how do i write a program that can input θstart, θstop, Npoints fill θ with values compute f(θ)=Asin(Bθ +C) + ...Dcos(Eθ +F) where A,B,C,D,E,F are variables

Member Avatar for Fbody
0
54
Member Avatar for Violet_82

Hi there, I have a really quick question about a shuffling and dealing cards program I found in a book. here's main: [CODE]// Fig. 8.27: fig08_27.cpp // Card shuffling and dealing program. #include "DeckOfCards.h" // DeckOfCards class definition int main() { DeckOfCards deckOfCards; // create DeckOfCards object deckOfCards.shuffle(); // shuffle …

Member Avatar for Violet_82
0
4K
Member Avatar for mushimushianone

How to make a looping statement on c++ that will give an output like this? ___________@ __________@@@ _________@@@@@ ________@@@@@@ _______@@@@@@@@ ______@@@@@@@@@@ _______@@@@@@@@ ________@@@@@@ _________@@@@@ __________@@@ ___________@ (underscore represent space)

Member Avatar for daviddoria
0
60
Member Avatar for esraa waqfi
Member Avatar for esraa waqfi
0
164
Member Avatar for ayat taj

[COLOR="Green"][I]CAN YOU HELP ME TO SOLVE THIS Assignment.... PLEASE....[/I][/COLOR] [COLOR="red"][B][U]THIS IS THE QUESTION : [/U][/B][/COLOR]Implement the linkedPriorityQueue class as defined below. Note the following:  Each node in linkedPriorityQueue represents a customer. A customer can be regular or with a high priority. High-priority customers have their high_priority variable set to …

Member Avatar for Fbody
0
209
Member Avatar for emanfman

Hi, I am a little bit troubled. I want to call a function in a separate file on a windows form. Here is my header file: [CODE]private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { String ^OriginalText; String ^ConvertedText; OriginalText = this->textBox1->Text; ConvertedText = ParseBBCode(OriginalText); this->textBox2->Text = ConvertedText; }[/CODE] This means that …

Member Avatar for emanfman
0
313
Member Avatar for kumaresen

#include <iostream> #include <fstream> #include <string> using namespace std; int main () { float calculateAverage(int[]); char Grade(float); char line[100]; int marks[100]; ifstream input; ofstream output; clrscr(); input.open("k:\\input.txt"); output.open("k:\\OUTPUT.txt"); if(!output) cout<<"Output file error"; if (input) { while (!input.eof() ) { input>>line; cout << line <<endl; output<<line; for(int i=1;i<=5;i++) { int num; …

Member Avatar for Fbody
0
281
Member Avatar for rogba

right now my program asks for 5 candidates but i want to make the user input as many candidates as they want to. how would i go about doing that?? #include <iomanip> #include <string> using namespace std; int sumVotes(int list[], int size); int winnerIndex(int list[], int size); int main() { …

Member Avatar for rogba
0
158
Member Avatar for kumaresen

i have a prob wit this code...it says variable letter is being used without being initialized...can anione tell me how n where should i initialize it...plz...m desperately in need of help...i m blank...m jst a beginner in c++... the c++ code is... #include <iostream> #include <iomanip> #include <fstream> #include <string> …

Member Avatar for JasonHippy
0
222
Member Avatar for newbiecoder

Hello, I am a university student and I have very few courses this term so I have a lot of free time. In this term I want to improve myself and gain experience on C++ with algorithms and data structures. But I don't know how to do that... I have …

Member Avatar for awie10007
0
262
Member Avatar for SWEngineer

just have those questions about those code sinppets from the C++ GUI Programming with Qt 4 book: GoToCellDialog::GoToCellDialog(QWidget *parent):QDialog(parent) Does that mean we are inheriting QDialog(parent)? Or, what exactly does this mean? setupUi(this); Here, this code snippet is part of the gotocelldialog.cpp file, which is the implementation of gotocelldialog.h header …

Member Avatar for L7Sqr
0
171
Member Avatar for kk33

Hi I am trying to convert the outbuff from WinHttpQueryHeaders to string but its not working properly... my code [CODE] if( GetLastError( ) == ERROR_INSUFFICIENT_BUFFER ) { lpOutBuffer = new WCHAR[dwSize/sizeof(WCHAR)]; // Now, use WinHttpQueryHeaders to retrieve the header. bResults = WinHttpQueryHeaders( hRequest, WINHTTP_QUERY_RAW_HEADERS_CRLF, WINHTTP_HEADER_NAME_BY_INDEX, lpOutBuffer, &dwSize, WINHTTP_NO_HEADER_INDEX); } } …

Member Avatar for kk33
0
1K
Member Avatar for NvIs

I'm trying to learn how to sort arrays. I tried to learn select sort, but I couldn't code it right... so I tried the easiest, bubble sorting and kind of got the hang of it! But with a few problems and questions. I'm trying to print an array with random …

Member Avatar for NvIs
0
129
Member Avatar for sabah88

hi.. everyone.. i wanted to ask can i actually combine c basic code in the c++ coding?

Member Avatar for ravenous
0
60
Member Avatar for kratosaurion

So here is my problem, my friend and I are writing a simple project for a electrical eng. teacher, who really doesn't know too much about programming c++. We were assigned to make a successive approximation ADC [URL="http://en.wikipedia.org/wiki/Successive_approximation_ADC"]Look here[/URL] in any coding language possible. I would have liked to make …

Member Avatar for kratosaurion
0
451
Member Avatar for bensewards

Hey everyone, I have to manipulate two functions RECURSIVELY, strlen and strcpy. I was able to code the strlen: [CODE]int length(char* str){ if(str == NULL){ return 0; }else{ return length(str, 0); } } int length(char* str, int l){ int len=0; if(str[l]){ len = length(str,l+1); } else { return l; } …

Member Avatar for bensewards
0
750
Member Avatar for sabah88

hi, i doing a project to send MMS using PIC16F876.. how to define the pic16f876 in c++? thank in advance.

Member Avatar for awie10007
0
214
Member Avatar for HashIncludeDotH

Hello, I am trying to compute the log transformation of an image(very easy... I know). But I am not getting the right result and I really don't know what I am doing wrong. I know the image provided is in the range of 0 and 1.5x10^6. But when I save …

Member Avatar for daviddoria
0
193
Member Avatar for CrazyProgrammer

Hi all, I wasn't sure where to post this, so I thought here might be best :D I have to develop a program that takes a webpage and extracts information from it, so I was wander how would be the best way to do this, without using an external library(like …

Member Avatar for daviddoria
0
140
Member Avatar for همس.

Write a program to maintain a list of some of your friends with their phone numbers. The program should reserve enough elements for 20 friends, and then present the user with an input screen to enter a friend name. The program then searches about the name in the previously existing …

Member Avatar for daviddoria
-8
86
Member Avatar for boot-baby-boot

Hello folks,i am teaching myself qt and i have run into a problem.In my data entry application,i want to bind my forms to my grid explained in this picture: [URL=http://imgur.com/KeNTI][IMG]http://i.imgur.com/KeNTI.png[/IMG][/URL] Right now,i am scratching my head plotting on how i am gonna accomplish this. Ideas are welcome.

Member Avatar for daviddoria
0
91

The End.