49,761 Topics
| |
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 … | |
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[], … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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() { … | |
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 … | |
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 : … | |
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? | |
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 … | |
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); … | |
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()" … | |
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 << ", " … | |
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 … | |
[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 … | |
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 … | |
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 | |
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 … | |
| 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 … |
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 | |
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 … | |
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; … | |
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 | |
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 … | |
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 … | |
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 … | |
/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. | |
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 … |
The End.