49,761 Topics

Member Avatar for
Member Avatar for Narue

Here's a challenge for you C++ aces. The challenge is to write a function with the following declaration: [code] unsigned long extract_digits ( unsigned long x, size_t n, size_t i ); [/code] This challenge has three parts. [B]Part I (Beginner):[/B] Write the extract_digits function. It should return a sub-value of …

Member Avatar for ivailosp
1
674
Member Avatar for Yellowdog428

Need some help. I have an assignment that calls for the sorting of two arrays. One is an array of doubles, the other chars (two dimensional). I cannot figure it out for the life of me. Here is the whole program. [CODE]#include<iostream> #include<iomanip> using namespace std; //Function Prototypes double sumRain(double[], …

Member Avatar for Yellowdog428
0
143
Member Avatar for Muttley

Hi all! I have just started learning c++ and i have a lil' problem compiling one of my programs (ADT). I havent finished it yet and started partialy verifying it, if it's correct or not, but i just met an error and i have no idea what the hell is …

Member Avatar for Muttley
0
137
Member Avatar for Numinel

Although not a C++ specific problem but you may have an idea how to help me anyway. A program that has worked for a long time suddenly stopped working and I suspect it's a security patch issue. Background: I've made a program on a Pocket PC (Windows Mobile 5) that …

0
47
Member Avatar for vaid.abhishek

Hi, Guys Here's an important problem I have been facing lately. My idea is to partition an array on basis of an element such that, this element has all the elements smaller than it before it and all the elements greater than it after it ... ( Similar to pivoting …

Member Avatar for Ancient Dragon
0
293
Member Avatar for timberland26

hello everyone. im a newbie at working with c++ and i have just got my assignment and it is to create a piece of software to analyse images of coins. can someone help me? i just need help starting it off then i can get the rest done. never done …

Member Avatar for Nick Evan
0
261
Member Avatar for Agni

[quote]Reposting from another forum as i didnt get many suggestions there[/quote] Hi Guys, In my project the user will enter the name of the organization and it's floor map has to be displayed. the maps have to be made by us and need not be complicated at all. what i …

Member Avatar for ithelp
0
199
Member Avatar for jimJohnson

I have an exam tomorrow and just going over quizzes I did not do all that good in and was wanting to know if anyone could assist me w\ my mistakes Quiz 6 This question asks me to put in the output int Function_one(int y, int x); int main() { …

Member Avatar for ithelp
0
77
Member Avatar for gothicmisery85

I was wondering if what I have done is correct or not. Here's what my book says to do: [I]"Write a function template that accepts an argument and returns its absolute value. The absolute value of a number is its value with no sign. For example, the absolute value of …

Member Avatar for Laiq Ahmed
0
248
Member Avatar for noraantonia

Using OpenGL in Visual C++: Part I #1 Jul 14th, 2004 Here is the example i also used to implement an opengl window ready for painting. But the problem is i still have flicker. How can i get rid of it ? pls help me... here is my code : …

0
71
Member Avatar for sfurlow2

Is there any way to create a variable amound of endl: i.e. divide height by ten and make that many endl in a cout statement?

Member Avatar for VernonDozier
0
72
Member Avatar for sfurlow2

For our class, we're supposed to simulate a moon lander program. For a given starting value for the height (200 feet above the surface), amount of fuel (100 pounds of fuel), and velocity (0 ft/sec), we're supposed to simulate a ship landing on the surface of the moon, depending on …

0
74
Member Avatar for roachic

Hi everyone. I'm trying to create an array of distinct random numbers. This is what I have so far. [CODE] std::vector<int> randomNumberVector; randomNumberVector.resize(10); void CBlah::Randomize(void) { int randomNumber; int length; int i; BOOL isTaken; length = randomNumberVector.size(); for(i = 0; i<length;i++){ while(randomNumberVector[i] == NULL){ randomNumber = GenerateRandomNumber(); isTaken = CheckRandomNumber(randomNumber); …

Member Avatar for roachic
0
196
Member Avatar for Suraine

Dear c++ guru: In c++, normally we will call a function as shown below: [code] int funct () { ...; } void main() { funct(); } [/code] main will call the function "funct()" which is defined within the same file. However, in my case, i wish to have the "funct()" …

Member Avatar for Suraine
0
115
Member Avatar for tones1986

Hey Guys I am trying to get a basic program to work with dynamic memory allocation. I have a problem with a overload operating my stream operator...<< On my previous program i used this: [code] ostream& operator<<(ostream& output, const Vector& p) { output << "(" << p.x << ", " …

Member Avatar for Ancient Dragon
0
137
Member Avatar for guest7

Hi, I wish to read an input file 5 times. I am able to read it once but when i try to read it second time i am unable to do that because the file pointer is stuck at EOF. Can anyone suggest a small sample code of how to …

Member Avatar for Ancient Dragon
0
88
Member Avatar for mengmarc

[B]The problem:[/B] Given a list of imployees, create a simple program that allows the user to insert, delete, display and search an employee. The prog. shall display 10 imployees as default. Also a list of menu should be display. The menu names are insert, delete, dsplay and search. [B]My questions …

Member Avatar for mengmarc
0
121
Member Avatar for metropolisiii

I'm not sure if this is possible but maybe somebody can help me. Is there a way to have a C++ programming running and extended it's code with code from an external file while it is running? In other words, more functionality needs to be added as the program is …

Member Avatar for Ancient Dragon
0
56
Member Avatar for ramiljoaquin

Hi everyone! What is the code if I want to connect to MS ACCESS or SQL SERVER using C++? Is there a special compiler for c++ for that database code? Thanks

Member Avatar for ramiljoaquin
0
94
Member Avatar for Rand22

i have been having problems inputting some data from a file and i am clueless as to why i keep getting the output i do. This is a partial part of my code but as you can see from my output for some unkown reason I am not inputting an …

Member Avatar for Ancient Dragon
0
712
Member Avatar for cnet1989

I'm making a program that reads in data from a file into 2 different arrays (one is an int array and another is a char array). And they are parallel. These are songs and song types (hip hop, jazz...etc). I want to print the songs as a playlist then I …

Member Avatar for cnet1989
0
90
Member Avatar for lizhiyuan

dear all i am a newcomer, i read c++ book already, still so blur for private, public and protected variables, anyone can give me examples for differe from them and some explanation. thanks a lot. LI

Member Avatar for Ancient Dragon
0
216
Member Avatar for demroth

I have been reading the posts on radix sort here at DaniWeb and at [url]http://www.cubic.org/docs/radix.htm[/url]. I have already created the code for the counting sort which will do the rest but I do not understand how to do the radix part. I guess what I am asking is if you …

Member Avatar for demroth
0
120
Member Avatar for alkeshtech

hey guys, I want to create 6 different random numbers without repetitions and this what I have done. I just wanted to make sure if this logic makes sense. [CODE] for(int n=0 ; n<6 ; n++) { randomInt[n] = generateRandomInt(0,20); cout << randomInt[n] << endl; } for(int i=0 ; i<6; …

Member Avatar for alkeshtech
0
105
Member Avatar for daviddoria

I made a library (.lib) with VS2005. Is there a way to convert it to a .a linux library without moving the code and setting up a project and compiling in linux? Thanks, David

Member Avatar for Ancient Dragon
0
62
Member Avatar for rem0404

the purpose of my assignment is to create a program using arrays and strings, with functions and parameter passing. i'm sort of having trouble with it anyway, but i'm currently stuck on the "load" function that i'm supposed to write. i've already written the isFull and addMessage (which i'm not …

Member Avatar for rem0404
0
70
Member Avatar for annapink

Hi, i need help with my c.w i know this is not the right place to ask but i have no other choice ! I had a friend who was suppose to help me to do this but went to holiday and now i have till 3rd april to submit …

Member Avatar for VernonDozier
0
108
Member Avatar for Carwy

Okay so I have have been beatting my head againest the wall and I can not get this to work right. I have asked my insttor and she does not know why it will not work righ either. I read in numbers as characters and then I place them in …

Member Avatar for Salem
0
439
Member Avatar for lookforlohith

/tmp/ccSx0L0H.o: In function `employee::getdata()': multi.cc:(.text._ZN8employee7getdataEv[employee::getdata()]+0x31): warning: the `gets' function is dangerous and should not be used.

Member Avatar for Narue
0
130
Member Avatar for andy06

Hi everyone, I generate in a for loop: 1- An array made of random numbers 2- Add the elements of the array and store the result in a number S 3- finally write in a .txt file the number j(number of time that the for-loop has been executed) and the …

Member Avatar for andy06
0
116

The End.