49,761 Topics

Member Avatar for
Member Avatar for jam7cacci

my task is to sort the input numbers from lowest to highest but i just cant make it work... i've tried different ways and I know there's a problem in my code. hope you can help me out. thanks! [code] #include <iostream.h> struct trial { int age; } getcount[5]; void …

Member Avatar for jam7cacci
0
167
Member Avatar for NicAx64

ahh , finally I backtrack the bug. Believe me I'm not saying that I'm experienced but many years I have been working with C++ , at least 5 yrs .I'm working with the C compiler since I was at the 7th grade. however the fun part is not boosting about …

Member Avatar for Will Gresham
0
526
Member Avatar for Nemoticchigga

This is a general question. I am familiar with accessors and mutators (getters and setters). I have now been reading up on semaphores. I am having trouble finding out differences between them/how they are related. Can anyone help me out with an explaination or a link? Thanks. P.S. - sorry …

Member Avatar for ArkM
0
132
Member Avatar for gangsta gama

Hello all, My code isnt working. It is supposed to be a RPG World of Warcraft game lol. 1) When I have [code=c++]if (inventory.size() == MAX_ITEMS) { inventory.push_back("Rusty Armor"); } else { deleteItem(); } [/code] 2) My deleteItem() function dosnt work, is their another way to do this? Here is …

Member Avatar for gangsta gama
0
122
Member Avatar for mampam

I have a main that I want to use getline to get the user's words after i do a strtok to eliminate these delimiters (" ,.-") and then find the soundex code of each word and insert the words into my hashtable. i made an attempt but i was not …

Member Avatar for Ancient Dragon
0
80
Member Avatar for ganmo

Hello, I've written a delete function to delete any integer value based on in parameter. The problem I have now is that this function deletes the values, but leaves the Node position intact with some huge int value instead. So my question is, do I need to rearrange the Node, …

Member Avatar for ganmo
0
125
Member Avatar for clutchkiller

When I declare an event table in a class a.k.a DECLARE_EVENT_TABLE(); then try to compile, i always get this error: [Linker Error] undefined reference to `vtable for Utility' (utility being my class) What does this mean and how do I fix it? All research on this has turned up dead …

Member Avatar for clutchkiller
0
219
Member Avatar for kavithabhaskar

Hi I am learning C++ and i coded this program but it isnt working as it was supposed to.. [CODE] #include<iostream.h> using namespace std; class furniture { protected: int color,width, height; }; class bookshelf : public furniture { private: int no_of_shelves; public: int accept() { cout<<"enter color"<<endl; cin>>color; cout<<"enter width"<<endl; …

Member Avatar for siddhant3s
0
146
Member Avatar for tomtetlaw

I am doind a tutorial, here is my code: [code=c++]#include "functions.h" #include <glut.h> #include <stdlib.h> //this is the function with the error: void HandleKeyPress ( unsigned char key, int x, int y ) { switch ( key ) { case 27: // escape key exit ( 0 ); } } …

Member Avatar for MosaicFuneral
0
63
Member Avatar for Samuelandjw

I use VS C++ 2008, and I have the following code [code=C++] int main() { int maze_size=5; int[3][2] oppo_pos = { {maze_size-1,maze_size-1}, {maze_size-1,0}, {0,maze_size-1} }; return 0; } [/code] When I compiled, VS gave out the following error messages: 1>c:\dev\visual studio 2008\projects\test\main.cpp(4) : warning C4091: '' : ignored on left …

Member Avatar for Sky Diploma
0
122
Member Avatar for everard

I have the following codes: [code=cplusplus] void CLOGFILE_INTERPRETERDlg::OnBtnLoad() { AfxGetModuleState()->m_dwVersion = 0x0601; //corrects the differences in MS DAO UpdateData(); m_Loading = _T("Loading..."); UpdateData(FALSE); UpdateData(TRUE); //UpdateData(); int length = 0; try { char strFilter[] = { "Log Files (*.log)|*.log|All Files (*.*)|*.*||" }; CFileDialog FileDlg(TRUE, ".log", NULL, 0, strFilter); if ( FileDlg.DoModal() …

Member Avatar for MrSpigot
0
357
Member Avatar for yingfo

Hi I was wonder if anyone could help with this problem I am receiving. My program is suppose to read in any character frequencies from a file, even spaces and /n. My problem is that is reading an extra character that I can figure out. I had inputed a text …

Member Avatar for Nick Evan
0
153
Member Avatar for acoxia

hello I been working on a swap program and this is about my third one trying to get it working now I'm having a problem i keep getting 0's added into it right now the output is 4, 0 , 5, 0 ,16. Could anyone tell me where the 0's …

Member Avatar for acoxia
0
94
Member Avatar for carolinepoland

Dears! My name is Caroline and I come from Poland. I am looking for help in my C++ problem. Sorry for my poor English, I hope You will understand me. This is my problem: I have to make some program: Make a recursive function which have a parameter - array …

Member Avatar for tux4life
0
113
Member Avatar for badboizEnt

please am having a problem with my code below. am actually want is when a numebr lesser than 0 and greater than 99, it should output an error message till the correct value is entered for the three numbers. please would be very greatful if my code could be edited.. …

Member Avatar for badboizEnt
0
142
Member Avatar for FREEZX

Hello all! I have a task to code a program that would find the last non-zero digit of the factorial of a given number n where 1<n<10000 so far i got this: [CODE=c++]#include <iostream> #include <string> #include <sstream> using namespace std; int main() { int a, xxx; unsigned long long …

Member Avatar for FREEZX
0
275
Member Avatar for perumar

Write a program that accepts a string input from the user and reverses the contents of the string. Your program should work by using two pointers. The “head” pointer should be set to the address of the first charter in the string and “tail” pointer should set to the address …

Member Avatar for tux4life
0
283
Member Avatar for danishamman
Member Avatar for vishy_85

hello all , i have my idl defined as follows : [code=cplusplus] #ifndef schedule_Mgmt_idl #define schedule_Mgmt_idl module schedule_Mgmt { //*************************** Structures ******************************* struct planData { string planName; string planDescription; string scriptExec; string startDate; string startTime; string stopDate; string stopTime; string delayInt; boolean repeatDelay; boolean notOnWeekend; boolean validity; string tempTime; string …

Member Avatar for vishy_85
0
148
Member Avatar for dragon_vn_101
Member Avatar for ithelp
0
73
Member Avatar for Behi Jon

What is the difference between this two codes for Complex class ? What is the preference of code that written by pointers ? Thanks ... First code with pointers : [code=cplusplus] //Complex.h #ifndef COMPLEX_H #define COMPLEX_H class Complex { public: Complex ( double = 1, double = 0 ); void …

Member Avatar for siddhant3s
0
124
Member Avatar for mushbucket
Member Avatar for mushbucket
0
88
Member Avatar for 1newguy

[code]//This program reads a course score and prints the //associated course grade #include <iostream> using namespace std; void getScore(int& score); void printGrade(int score); int main() { int courseScore; cout << "Line 1: Based on the course score, \n" << " this program computes the " << "course grade." << endl; …

Member Avatar for siddhant3s
0
166
Member Avatar for Dragonsfire

I appear to need some help with a sudoku solver I'm working on. It's supposed to check the row, column, and grid. When I run my program it displays the puzzle, but then it ends abruptly. I was hoping someone can take a look at my functions and see if …

Member Avatar for vmanes
0
149
Member Avatar for u8sand

Well, i thought everything was perfect since my last post. But i have the strangest error. Maybe its because i don't completely understand references... So anyway here is my string class: [code] class StRiNg { public: StRiNg(); StRiNg(const char* const); StRiNg(const StRiNg&); ~StRiNg(); StRiNg& operator=(const StRiNg&); char &operator[](int); char operator[](int) …

Member Avatar for u8sand
0
152
Member Avatar for shadowmann2330

do { cout << "and how many of the 4 opponents would you like to play aganst?"<<endl; cin >> numberofopponents;//were the user inputs the number of opponents if(numberofopponents==1)//the if statment that plays the game if the user choses 1 opponents { cout<<"1 opponent......really????? ... noob"<<endl; cout << "round one!"<<endl; cout …

Member Avatar for ArkM
0
139
Member Avatar for guest7

Hi, I am getting the following error while compiling the code on linux machine. "aggregate value used where an integer was expected" I am getting this error on a simple for loop. I do not know the reason for this error. Any help is appreciated. Thanks

Member Avatar for tux4life
0
62
Member Avatar for richhoggan

I am working on a programming assignment for class and having a little trouble. The biggest trouble I am having is working with arrays and doing the hex calculations, then making the conversion back to decimal. I have included the assignment description below: Write a C++ program to perform addtion …

Member Avatar for Intrade
0
436
Member Avatar for songweaver

Hey guys I was wondering if you could provide some help, It is pretty complex for a person who is just starting loops. I have included the problem as well as the code I have below. Please help me, I know their is something wrong with my [B]for[/B] loop as …

Member Avatar for songweaver
0
192
Member Avatar for Crago3

Hi I am having a problem in the sixth edition on starting out with C++ programming. I need the full code of how to do it cause I am getting errors and dont know what I am doing. The question ask.Write a funtion named coinToss that simulates the tossing of …

Member Avatar for Narue
0
452

The End.