49,760 Topics

Member Avatar for
Member Avatar for xtremerocker

I was viewing the practice problem section and decided to give a go at them, anyways, this is my Palindrome dector code. Could someone just take a look at it and explain to me if there is a better way to execute this problem? - michael [ICODE]// Palindrome check by …

Member Avatar for xtremerocker
1
113
Member Avatar for Bladtman242

Hi again, first; i realise this peace of code is stupid, it has been taken out of context, altered for the sake of simplicity etc. I wonder if the problem is the quite large number stored in int to (changed to unsigned long int) i have read on cplusplus.com that …

Member Avatar for Bladtman242
0
159
Member Avatar for smithss

Hi i have written a standard library function 'strcat' on my own, even though the output seems ok, can someone please verify if what i'm doing is right? i get confused using pointers. [code] void mystrcat(char *a,char *b) { while (*a++ != '\0'); *a--; while (*a++ = *b++); } [/code] …

Member Avatar for smithss
0
113
Member Avatar for ribena500

Hi, I have this code for an array: [code] { cout << "how many tins sold? " << (i+1) ; cin >> tinssold; cout << "how much is each tin?" << (i+1) ; cin >> tinprice; value=(tinssold*tinprice cout <<"total value of tins is " <<value; } [/code] IF I WANTED …

Member Avatar for Comatose
0
98
Member Avatar for alfred210989

excuse me, i want to make explosion in c++. n i got trouble.. i really dont know the psudocode after i try to make it in paper a whole day. anybody can help me? i will specially give a thank you if can give me the real program of explosion …

Member Avatar for alfred210989
0
1K
Member Avatar for animefun2

THIS IS WHAT I HAVE DONE SO FAR (QUESTION BELOW IT) [CODE]class Customer { public: int noOfCalls; String custName; virtual Compute_Bill(); }; //define function, contructors etc by Customer::Customer() etc class Premium_Customer: public Customer { //premium specific function that inhereit from customer }; [/CODE] HERE IS THE QUESTION I need help …

Member Avatar for Murtan
0
107
Member Avatar for Phil++

So basically, I'm creating a switch statement that if the user enters a p or if they enter a P it will still work, any ideas? Thank you

Member Avatar for grumpier
0
115
Member Avatar for Phil++

Basically what I am trying to do is get the width and height of the doors in a room. The user enters the number of doors in the room, it then goes into a for loop which then asks for the width and height of each wall. The problem is …

Member Avatar for Phil++
0
90
Member Avatar for tomtetlaw

i am doing the 'getting started' tutorial that comes with the dark gdk, and i ran into this error: c:\documents and settings\tom\my documents\visual studio 2008\projects\hello world\hello world\main.cpp(6) : error C2065: '“animatedsprite' : undeclared identifier heres my code(that i copied from the pdf): [code=c++] #include "DarkGDK.h" void DarkGDK ( void ){ …

Member Avatar for springwater
0
165
Member Avatar for dparas

Hello guys, I ve been searching for a long time for an algorithm (in c++) that would take the number of digits and give all the possible combinations between 0 and 1. For example for number of digits 3 will give 100 010 001 110 101 011 111 The funny …

Member Avatar for ArkM
0
1K
Member Avatar for noodlecode

Ok i have a few questions. I'm fairly new to programming. Im starting to get a little functional with java, i can handle GUI's, threads, exceptions, 2d graphics, JDBC etc. I took a class in C++ only to find that I am not even close to producing graphics or GUI's …

Member Avatar for Freaky_Chris
0
158
Member Avatar for ace_dman

I just want to ask something about using a stack in maze Im confused about implementing stack in c++.is it possible that I can insert a multidimensional array in a stack,how?:S (can you please give me some little bit of codes in order to do that) I did already a …

Member Avatar for ace_man
0
2K
Member Avatar for guest7

Hi, i have few programs which i have compiled using "make all". When i debug the main program, during debugging i get the following message : ****Stepping over inlined function code.*** As a result i am unable to debug the program line by line. The debugging is random. I am …

Member Avatar for StuXYZ
0
95
Member Avatar for dannybarh

i need a random generator. it should be able to generate serial #s along side. any website in mind? please help.:yawn:

Member Avatar for StuXYZ
0
134
Member Avatar for LucyB

Hi all... Basically I'm wondering how I complete a loop based on the number of times a user requests it. For instance, I'm doing an employee system that works out pay based on hours. There are lots of rules/criteria about what they pay is recieved based on the input hours. …

Member Avatar for LucyB
0
83
Member Avatar for lameassthemity

I'm writing a class planner, where the user is given the opportunity to enter certain information about their classes and have it printed back to them upon request. The problem I'm having is that whenever I enter any text into the input with a space in it, it returns me …

Member Avatar for zalezog
0
129
Member Avatar for sirihoney

I really wonder whether the diff command can be implemented in c++.. But i need the code for tht..anyone please help... Sirisha.

Member Avatar for Salem
0
48
Member Avatar for DmD

hey, im trying to use the mpg123 library to extract the sound data from the mp3 file.... ive used this example to decode the file: [url]http://mpg123.de/api/mpg123__to__wav_8c-source.shtml[/url] i can extract the info about the file but the actual sound data im having troubles.... because it doenst give me the whole data …

Member Avatar for Salem
0
283
Member Avatar for MrPickle

How can I play sounds under windows? I know about PlaySound() but I want to load the sound by myself, then play.

Member Avatar for Comatose
0
43
Member Avatar for ribena500

Hi, I am using this code: int total = 0; for (i = 0; i < 3; i++) { total+=hours_run[i]; cout <<"\n"<<total; } The aim of this code is too add up the hours run by the 3 people who enter the values. The code above produces some weird results. …

Member Avatar for ribena500
0
89
Member Avatar for vikashkumar051

Hi, I am pasting here code for finding path using Dijkstra algorithm. [icode] #include <stdio.h> #include <limits.h> #include <assert.h> typedef enum {false, true} bool; /* The order is rather important to get the boolean values right. */ typedef char *string; #define oo UINT_MAX /* infinity is represented as the maximum …

Member Avatar for vikashkumar051
0
760
Member Avatar for cppnewb

Hi. I was just wondering what you thought about C++ and windows development. I'll post a pie chart daily as long as people continue to respond. The Question: What do you think about C++ and windows development.? A - You should only learn C++ B- You should only learn Windows …

Member Avatar for Rashakil Fol
0
108
Member Avatar for cppnewb

Hi. I'm beginning to wonder if youre dreading my posts - they are so dumb but.... Is there a way in Microsoft Visual C++ Express Edition to compile the program and save it as a [b].exe[/B] file? Thanks!

Member Avatar for VernonDozier
0
77
Member Avatar for guest7

Hi, I am getting the following error while compiling: "Undefined symbols: "main_class::binary(int, std::vector<int, std::allocator<int> >&, int)", referenced from: main_class::identity(int, int, int)in test_sat.o ld: symbol(s) not found collect2: ld returned 1 exit status make: *** [test] Error 1" Following is the code : [ICODE]int main_class::identity(int rowno, int size_row, int loop_iterate) { …

0
48
Member Avatar for shamila08

Hello dear all. i need a help where i'm try to calculate execution time for my program. seem i have a problem with how to set it up. [code=cplusplus] #include <iostream> #include <time.h> #include <sys/timeb.h> typedef int tRow[10]; int N, i; int x[100], xi[100]; /* The permutation and its inverse …

Member Avatar for shamila08
0
152
Member Avatar for david7

[QUOTE=ArkM;657823]You are welcome![/QUOTE] Simulation of an Airport Runway An airport is developing a computer simulation of air-traffic control, which handles events such as landings and take-offs. It is a small busy airport with only one runway. In each unit of time one plane can land or one plane can take …

Member Avatar for Freaky_Chris
0
268
Member Avatar for serkan sendur

i want to create a document using apache xml parser, can you guys provide me with sample code? After creating the document in the memory, i want to save it as an xml file.

Member Avatar for Comatose
0
97
Member Avatar for HarryGabriel91

Hi! I want to write a program, which calculates and draws the path of a planet around a sun. Actually it just draws the planet and the sun (and the velocity and the gravity force vectors). The sun is still, it doesn't move, just the planet is moving. The planet …

Member Avatar for MosaicFuneral
0
140
Member Avatar for Cyberbanana1

Hi. I take a c++ class in school and we use Borland 5 as our compiler. At home, i have windows visual studio 9.0 installed. We normally just make programs that run inside the command prompt, but we are beginning work on doing things visually. My question is, whats the …

Member Avatar for dmanw100
0
82
Member Avatar for csaawariya

hi..i am having problem in writing a function which returns a boolean value if the linked list is circular or not...the linked list is singly...moreover the circular means here not simply last node next is first node but linked list can be circular from any node to any node... i …

Member Avatar for StuXYZ
0
121

The End.