51,592 Topics

Member Avatar for
Member Avatar for iammfa

Hi, This is an exercise I solved it, I want to know, is my solve is the best solve or there is notes, if there is a notes, I'm glade to hear it: [B]The Exercise:[/B] [CODE]Make a program that calculates the sum, mean, minimum, and maximum of a series of …

Member Avatar for chiwawa10
0
165
Member Avatar for Chris_Giarla

Hello everyone! So I am still coding this game and every time I make progress somewhere I take a step back somewhere else. I know that it is late but I am re-writing from scratch. Anyway, the basic concept of how I am doing this now is as follows: I …

Member Avatar for Fbody
0
203
Member Avatar for mrnobody

Hi, Can somebody please advice me on raising/throwing custom exceptions? Here is what I'm trying to do. [CODE] //MainFunction() will call SubFunction() to perform some ADO function. MainFunction() { try { SubFunction() //OtherFunction1 //OtherFunction2 } catch(...) { //to catch custom exceptions raised by me in SubFunction() so that it will …

Member Avatar for caut_baia
0
84
Member Avatar for BLKelsey

Guys, I could really use some direction in getting this console program working for a C++ assignment. I'm in my 8th week and although I've been doing good on past projects, this is a multiple file assignment and I'm confusing myself the more I try to understand. I feel like …

Member Avatar for BLKelsey
0
270
Member Avatar for smkdude

Hello, I am currently trying to write a board game, and I am having trouble making each GameTile on the board access the same Point on the board. Each GameTile contains a certain number of Points, and sometimes Points overlap(the Point on a corner of one tile may be the …

Member Avatar for smkdude
1
166
Member Avatar for Rexzie

Hi fellas..this is my first post here..I am new to this 'hardcore programming' and all..I came across a problem for which I killed some time..with no fruits..It might be simple,trivial or even 'famous' for you guys..Any assistance is appreciated much.So here it goes.. Given an integer,the problem is to find …

Member Avatar for Rexzie
0
168
Member Avatar for d34dw4rd

Parking lot simulation This program simulates the operations of a parking lot. This particular parking lot consists of two alleys, each of which is wide enough for only one car and is closed at one end. You must use a Link List. Alley A Alley A is the primary parking …

Member Avatar for Lerner
0
288
Member Avatar for superchica08

hello everyone i was wondering if anyone would be able to help me in an program i have to do. the program wants me to use my initials A and G and plot them on using gotoxy() function to make some thing that look like the picture in the link …

Member Avatar for superchica08
-1
919
Member Avatar for trantran

Is there a safe and legal way to go from a pointer to a member of an object to a pointer to that same object?

Member Avatar for trantran
0
130
Member Avatar for aaronmk2

I am trying to use pow(2,a); and I am getting a error 'pow' ambigous call to over load function. I don't understand why, I added the cmath libarary. Here is the code. [CODE] #include <iostream> #include <cmath> using namespace std; int binaryToDec(int); int main() { binaryToDec(1110); return 0; } int …

Member Avatar for aaronmk2
0
94
Member Avatar for DrueY

Hi Everyone, I need help understanding how these traversals work :s [url]http://en.wikipedia.org/wiki/Tree_traversal[/url] On this page they have the code for these tree traversals, but I don't quite get it. For example, printing using the in-order traversal (using the example tree provided on the site) should give: A, B, C, D, …

Member Avatar for DrueY
0
467
Member Avatar for babzog

Hey folks, Probably a stupid error on my part, but I'm having trouble with this. Using ioctl calls to get adapter info on a linux box. I've got it working using a fixed size array (of struct ifreq) but it's not working when I try to use a dynamic array …

Member Avatar for babzog
0
128
Member Avatar for daino

Hi Would anyone know if there is a book explaining all the various C++ Libraries and what features they encapsulate? I'm thinking in terms of, for example: iostream -- then a list of features and functions in iostream etc. Could anyone suggest any books or good reference material for this …

Member Avatar for daino
0
220
Member Avatar for vihrao

I am trying to add two matrices and get error when I add two matrices in the line rslt = m1+m2 using operator overloading. Both m1 and m2 are matrix classes. Here is the code: [CODE] int main(int argc,char *argv[]) { matrix * rslt; //matrix *m1 = new matrix(); matrix …

Member Avatar for vihrao
0
232
Member Avatar for apurva agarwal

hi!! i want to know about the huffman algoriyhm and its implementation. how the huffman code works and its use, a code in c/c++ language

Member Avatar for asim88
-1
420
Member Avatar for Mekalor

Hello, I'm making a program that can play Bejeweled 2. Everything is working smooth except for a glitch in the movement algorithm. If anyone is really good at making these type of algorithms can you look at this code and/or give me some hints ? This is the core algorithm …

Member Avatar for Mekalor
0
120
Member Avatar for etisermars

Hello, Need a litle help with a problem. It is posible to automatically change the value of variables? For example: If i have 2 variables: "a" and "b", and let's say initially "a"= 3 and "b"= "a"+5; If i change "a" = 7, how can i do that "b" automatically …

Member Avatar for Banfa
0
114
Member Avatar for lulusweety

I have to program Portable Data Terminal(PDT) using C++. Is there any site that gives the details? I could not find. Please help me with code examples bcause I am new to this. Thanks in advance

Member Avatar for lulusweety
0
87
Member Avatar for coded_hitec

Gentlemen, Is it possible to initialize the array at the time of creation?? I mean: int *a = new int[10]; // here array is only created. I wanna initialize the same too here itself. Is it possible???

Member Avatar for coded_hitec
0
111
Member Avatar for Jaivani

my program runs but it only displays the passing ones not the failers it a mulitinention array that user enters the amount a student and grades to be entered. an such make is the pass and if low ey fail. but my program just reads the first grade and if …

Member Avatar for Buffalo101
-2
60
Member Avatar for mickmos

hey guys. i am having a problem with combo boxes in c++. i am making a very simple game for a subject at uni, in this game you pick up guns and shoot monsters. each gun has attributes; damage range and name. when you pick up a gun it is …

Member Avatar for mickmos
0
314
Member Avatar for vbx_wx
Member Avatar for vbx_wx
0
111
Member Avatar for onurozcelik

Hi, In my application I have two object type. One is field item, other is composite item. Composite items may contain two or more field items. Here is my composite item implementation. [CODE] #include "compositeitem.h" CompositeItem::CompositeItem(QString id,QList<FieldItem *> _children) { children = _children; } CompositeItem::~CompositeItem() { } QRectF CompositeItem::boundingRect() const …

0
80
Member Avatar for rkp728

I want to know how a read/write calls is accomplished in linux? I mean how a function say read() will read the data from a file. What all will be the steps from user mode read() function call to kernel mode? Will anybody explain the steps or let me know …

Member Avatar for rkp728
0
162
Member Avatar for shrutinr

Hiii... I want to know how to open two windows forms at a time... when i give as Application::Run(gcnew Form1() ); Application::Run(gcnew Form2() ); Then, the Form2 will open when first one closes,... So any one please help any other way is their so that , i can open two …

Member Avatar for shrutinr
0
121
Member Avatar for ddanii

Hello, when I give fprintf the character 0x0A, then it prints out 0x0D and 0x0A (which is \n in Windows). How can I print only 0x0A? I need to print a picture into a file containing 16-bit pixels, (and some bytes contain the value of 0x0A,) so it is very …

Member Avatar for ddanii
0
114
Member Avatar for mmgoicochea

Hi everyone I m openning this theat because I want to see if any of you can help me... well lets see ... I got my full time back at work (after 2 years :o ) and Im worry about college because I do not have enough time to complete …

Member Avatar for mmgoicochea
0
447
Member Avatar for slowlearner2010

hi all, i want to insert some data into my database (ms access) using c++...for ur info, im trying to do a register user for my login page..i hope after insert some data to text box and click button "ok"....all the inserted data was stored to database (ms access)....how to …

0
68
Member Avatar for gregarion

Hey guys, i am working on a project which basically takes a string which is being inputted by people and then adding it together and displaying in a certain format. What i am having problem is when i try to read the string and store it into the functions. [CODE]class …

Member Avatar for jonsca
0
121
Member Avatar for sgriffin

Ok so I have an operator* for left scalar matrix multiplication that is correctly outputting for the first 4 outputs and not for the next 4. If I have a matrix M2 with inputs [1,2;3,4;5,6;7,8] (the semicolon means next column), and multiplying it by 4, then I am getting the …

Member Avatar for WaltP
0
81
Member Avatar for cablee

I need to somehow open and read a picture of a map (jpg/png/bmp) into a 2d array so I can use the array to determine what terrain type is at that element/position on the map. Looking for tut's on working with picture files (jpg/png/bmp) with c++ I have found none. …

Member Avatar for Coder++
0
151
Member Avatar for coding101

after i input the three letter, i cant get the number back.. [CODE]#include <iostream> using namespace std; class Month{ public: int month; Month(char& one, char& two, char& three); Month(int& numb); Month(); void input1(istream& input); void input2(istream& input); void output1(ostream& output); void output2(ostream& output); }; int main (){ char x,y,z; int …

Member Avatar for Coder++
0
149
Member Avatar for mindcheck101

What type of developer creates audio plugins for digital audio workstations like pro tools and cubase

Member Avatar for Salem
0
44
Member Avatar for Kevin38

[CODE]#pragma warning (disable: 4786) #include <algorithm> #include <iostream> #include <string> struct PhoneBook { PhoneBook(std::string s, long num) { name = s ; number = num ; } PhoneBook() {} friend std::ostream& operator<<(std::ostream&, const PhoneBook&) ; long number ; std::string name ; } ; std::ostream& operator<<(std::ostream& os, const PhoneBook& rpb) { …

-4
34
Member Avatar for react05

Hey guys, how would i create a random number to decide whether it should enqueue the customer or not. thank you.

Member Avatar for alex034
0
100
Member Avatar for metroidfreak

Hi, I'm trying to figure out how classes work. I currently am working on getting a class to read a string and then place it into an array, as well as have the class then output the entire array. I wrote the following code to make sure i could get …

Member Avatar for metroidfreak
0
182
Member Avatar for aaronmk2

I am trying to learn about recursives and found this code on the internet. It works, but am not sure why. Could some one explain to me why this works. I have posted comments by the function to explain what I do not understand. [CODE] #include <iostream> using namespace std; …

Member Avatar for aaronmk2
0
107
Member Avatar for Xorlium

Hello! Suppose I'm using an external API, and in that API, they define: const Bar& Foo() const; So this function returns a Bar by reference. Now, I have a function void f() { Bar P = Foo(); } Is it safe to const_cast whatever is returned by Foo? I want …

Member Avatar for Xorlium
0
173
Member Avatar for yongj

I'm doing a homework assignment about constructors and this is really bothering me. I keep getting the error "constructors are not allowed a return type". I HAVE put a semicolon after the class declaration. I'll post my code here. [CODE]// Joseph Yong // CSC2430 // Homework_6 //Header File /*--------------------------------------------------------------------------*/ #include …

Member Avatar for NathanOliver
0
366
Member Avatar for Sylviodrood

SO basically what im trying to do is take an input number of any base and convert that number to any base(allowable bases 2,4,8,10,16). I am trying to think how i am supposed to go about coding it, wondering if anyone can point me into the right direction. Thanks

Member Avatar for mrnutty
0
76
Member Avatar for prodstar

hi i'm currently making a program relating to money and i need my c++ to read one of my excel files which has all the prices etc in it how do i make it work? =/

Member Avatar for gabryprof
0
185
Member Avatar for Atlanticspace

[code] 842 M C 20.00 15 2 250 10.00 UC RosebudTheatre 90 One Mike Stand 990 E C 20.00 19 2 1250 10.00 TX TexasHall 75 Maverick Speaker Series554 C N 16.45 30 1 35 0.00 UC PaloDuraLounge 60 Global Grounds Coffee Hour 318 E C 18.00 3 4 350 …

Member Avatar for VernonDozier
0
110
Member Avatar for ShortYute

[B]Modified mostly from dileepkumar235's [URL="http://www.daniweb.com/code/snippet217246.html"]Login functionality in C-language[/URL] [/B] Inspiration from Narue and my previous post ([URL="http://www.daniweb.com/forums/thread249149.html"]Limit buffer Input[/URL] ) This allows you to prevents the user from entering past the array limit (SizeOfArray) if the user enters more the curser will just automatically backspace by 1 for eg (max …

0
206
Member Avatar for thatom

Hi I am using borland C++ Builder 6.0 and I would like to include finger print technology in my program. I want to store finger print images in the paradox 7 database. I would like to log on into the program using the fingerprint. I have a UrU 4000B finger …

Member Avatar for mitrmkar
0
212
Member Avatar for Atlanticspace

ok so im trying to get my line of text file working with my file input. the Last part of my text file has a name of an event with spaces which I want to include those spaces so I needed a getline. apparently for some reason my getline function …

Member Avatar for Atlanticspace
0
165
Member Avatar for bletchley

Hi. I'm a Java programmer making the switch to C++. Could someone enlighten me as to what's going wrong here: [B]g++ -o fermat.cc main.cc[/B] main.cc: In function `int main()': main.cc:8: error: `Fermat' was not declared in this scope main.cc:8: error: `f' was not declared in this scope main.cc:8: error: `Fermat' …

Member Avatar for nezachem
0
127
Member Avatar for cecp

Can anyone help how to develop simple GUI in Win API. The window should looks like "Options windows" in Firefox (Tools->Options). I would like to create something when I click on the button above(like in FF) the content in below will change. I know how to implement it, but I …

0
30
Member Avatar for sgriffin

How would you fill a 2d vector with NULL. I've tried doing [CODE]vector<vector<int> > data; data (10, vector<int> (10,NULL))[/CODE] But I get an error, and I've also tried setting it to NULL through two for loops and that produces an error as well. Can someone point out what I'm doing …

Member Avatar for sgriffin
0
92
Member Avatar for aleX_X

Suppose I have a vector that is of class X data type. I was wondering if I could access the classes functions through the iterator of the vector, and if I could then what would the code look like? Would I just call the function the way I would normally …

Member Avatar for mrnutty
0
85
Member Avatar for viziroth

ok so I have what seems like a simple problem... simple code [CODE] int date; cout << "Enter the date in MMDDYYYY format: "; cin >> date; [/CODE] problem happens when someone starts the int with a 0 for example cin >> 03081991 date = 24 if I add another …

Member Avatar for iamthwee
0
106

The End.