49,757 Topics

Member Avatar for
Member Avatar for noty1

im looking for a code that shows how the directed graph is being implemented in C++ classes. i havent figured out the algorithm to be used. all i know is the concept of directed graph. edge() and vertex() function will be created in a class. all i need to know …

Member Avatar for VernonDozier
0
105
Member Avatar for Sky Diploma

I have to find the sum of the prime numbers below 2million so here is the program that i have written. [code=c++] #include <iostream> using namespace std; bool is_prime(int); int total=0; int main() { int num=2000000; for(int x=1;x<=(num);x++) { if(is_prime(x)==true) { total+=x; cout<< total<<"\n"; } } cout<< total; return 0; …

Member Avatar for Sky Diploma
0
127
Member Avatar for steve.callen
Member Avatar for jencas
0
80
Member Avatar for tones1986

Hi all. I am finishing up a project previously posted. I am to create a student 'database' that consist of one student and X number of classes the student has taken. My problem now is that i cannot run a test on the linked list correctly. I am to check …

Member Avatar for DemonGal711
0
703
Member Avatar for ooyellowchicoo

I'm using Visual C++ 2005 Express Edition I'm suposed to make the message box say "The Mallard Cafe is 3 stores to your left" when the button is clicked. I was given a hint but I have no idea as to where to put it. [code] Private Sub MallardCafe_Click(ByVal sender …

Member Avatar for dmanw100
0
106
Member Avatar for MentallyIll5150

I am having a couple issues with the following code. Any help with understanding what I am doing wrong is worth its weight in gold rather than handing me the answer. My problem with the following code is I can Add a Flight to the database but it seems to …

Member Avatar for MentallyIll5150
0
121
Member Avatar for neoseeker191

I've read about 6 tutorials on this but for some reason it makes no sense to me. Could someone possibly work with me to help me understand this concept? Such as how would you overload something like this: int result = 2 + 5;

Member Avatar for neoseeker191
0
168
Member Avatar for sarifah
Member Avatar for ace_man

As we know priority queue is known for its first element is always the greatest of the elements it contains but how can I make the first element to be the lowest element of them all? [CODE]// priority_queue::push/pop #include <iostream> #include <queue> using namespace std; int main () { priority_queue<int> …

Member Avatar for StuXYZ
0
216
Member Avatar for xonxon

i am new here,still not familiar with the code.So my Question is i have been given an assignment on how to design a class,pointType , that can store and process a point in the x-y plane. The program should perform setting and printing coordinate of the point, returning the x- …

Member Avatar for Stefano Mtangoo
0
149
Member Avatar for Icebone1000

Doesnt matter if i build, rebuild, clean and do all again, if i want to debug it will ask again and build it before execute the program... I dont know what happened, I have been like a month away from my pc, and now i returned and visual studio(2005 pro) …

Member Avatar for Icebone1000
0
166
Member Avatar for massivefermion

Hi people Can someone introduce me a website or e-book (but not a book) that explains each windows API function or data type or...one-by-one? thanks

Member Avatar for death_oclock
0
106
Member Avatar for JDsmith

Alright everyone, I'm a little behind in my programming class and I missed the lecture on functions. I'm not asking for anyone to do my work for me but a little help on where to start would be nice. thanks :) alright well here's the question... Write three C++ functions …

Member Avatar for JDsmith
0
114
Member Avatar for jakethesnake86

I am trying to program a microprocessor using c/c++ with assembly subroutines. I have a working assembly subroutine, Button_Push, that returns a 1 if a button has been pushed. I have tested this subroutine in an assembly language program. I am really having trouble using the subroutine in C though. …

0
86
Member Avatar for shasha821110

Hi, my company have a big project now. Which we have some video detection software and could create some investigation figure. We want to do plug-in into the Powerpoint and i am kind of junior here. But i really want to do more in my company. So i want to …

Member Avatar for shasha821110
0
146
Member Avatar for keyser soze

Hi, I'm a beginner in C++ and I need some help how to get a website's source code and save it into a string. Oh, and also: how can I then search the source for a specific keyword AND how can I "extract" a word between 2 keywords ? Here's …

Member Avatar for ArkM
0
119
Member Avatar for BranRam

hello, what i'm trying to do with this program is take something like 123456 and have it turn into this 1*x^2+3*x^4+5*x^6. i have code but i'm just lost in the whole idea of how to do it. so my code is probably completely wrong. if anyone knows how to do …

Member Avatar for ArkM
0
85
Member Avatar for moshe5

Hi All! I am currently stuck on a c++ program I'm working on. So the program will have the user input data into a 2-d array. sample dialogue: BLOB SIZE CALCULATOR- Enter coordinates for each filled cell; e.g 2 3 Do not enter commas or parentheses. Enter -1 -1 to …

Member Avatar for Lerner
0
110
Member Avatar for masterlion
Member Avatar for ChroNoS

I am doing a project on steganography ( I hope you know what it is :) ) I have to convert a text file (if possible a RTF File) to an image file like jpg or gif etc. But I do not seem to get around this problem and I'm …

Member Avatar for Salem
0
382
Member Avatar for tksrules

The question is (Package Inheritance Hierarchy) Package-delivery services, such as FedEx®, DHL® and UPS®, offer a number of different shipping options, each with specific costs associated. Create an inheritance hierarchy to represent various types of packages. Use Package as the base class of the hierarchy, then include classes TwoDayPackage and …

Member Avatar for VernonDozier
0
342
Member Avatar for tpetsovi

Ok, the program allows me to input every value and everything executes, but heres what comes back when the calculations at the bottom are supposed to happen. take a look. Please help? [ICODE] For your 1st class please select the appropriate number for your grade. For an A, select 1. …

Member Avatar for Nick Evan
0
147
Member Avatar for Tiago Santos

Hello Everyone. Congratulations for the Forum. Ok... How can I print a external file ( and .doc document for example) using C++??? The document I wanna print is a .lbl extension. A zebra printer label model, and I'm using a seguential number on this label and every time I right-click-print …

Member Avatar for Ancient Dragon
0
207
Member Avatar for winrawr

So, I'm dynamically allocating a char array in a function, then returning that array to an un-allocated char array in main(). Code: [code=cpp] #include<iostream> using namespace std; char* cc(char*,char*); int main(){ char* strMain; char* str1="Well, hello there, "; char* str2="How are you?"; strMain=cc(str1,str2); cout<< strMain; } char* cc(char* str1,char*str2){ char* …

Member Avatar for winrawr
0
122
Member Avatar for tpetsovi

Just a note, were not using arrays or functions, other than main. We've only covered the basics and started to get into <iomanip> and the stuff thats in that liabrary. Thanks in advance. [ICODE]#include <iostream> using namespace std; void main () { const double A = 4.0; const double B …

Member Avatar for Comatose
1
126
Member Avatar for hurbano

Hi. was asked to add the definitions of the function to overload the operators from this: [code] void monthsSet::unionSet (monthsSet &B) { for (int i=0; i<12; i++) if (B.months[i]) months[i] = true; }; [/code] Ive been trying for hours. Ive read my textbook and gone over my notes. Unfortunately i …

Member Avatar for hurbano
0
77
Member Avatar for scott_s58

Can somebody help me with this? You are burning some music CDs for a party. You've arranged a list of songs in the order in which you want to play them. However, you would like to maximize your use of space on the CD, which holds 80 minutes of music. …

Member Avatar for Comatose
0
159
Member Avatar for Udxero

Modify your week 5 assignment to include a function for both A and B. The function for A should have the quantity of numbers passed in as a parameter and needs to return the largest number. The function for B should have no parameters and return the smallest number. Here …

Member Avatar for shasha821110
0
240
Member Avatar for VBNick

Im having a very strange problem that I can't explain =/ this is what the compiler is saying: 1>------ Build started: Project: 3d, Configuration: Debug Win32 ------ 1>Compiling... 1>RENDER.CPP 1>Generating Code... 1>Compiling... 1>GEOM.CPP 1>MAIN.CPP 1>MOVEMENT.CPP 1>Generating Code... 1>Linking... 1>MAIN.obj : error LNK2005: "struct OBJECT * obj" (?obj@@3PAUOBJECT@@A) already defined in …

Member Avatar for VBNick
0
287
Member Avatar for vaid.abhishek

Dear Folks, I have a fairly complex problem at hand. I need to be able to define various class hierarchies, which are causing me a lot of trouble. I wanted to know a few of C++ features to clear out my confusions. Firstly, lets us suppose we I need to …

0
77

The End.