49,767 Topics

Member Avatar for
Member Avatar for mysterio

[B]1. User will enter the ISBN, The system will trace the title and price of the book automatically. The system should check whether the book is in the stock or not. If it is not, please let the user to enter again. 2. Allow a customer to buy more than …

Member Avatar for Stoned_coder
0
157
Member Avatar for MillStrike

I'm kinda new to c++ and can only do very simple applications. Could someone explain why this code works: [code] #include <iostream> using namespace std; int main() { bool inword = 0; unsigned int numwords = 0; char *str = "this is a test string for my project"; char letter; …

Member Avatar for Drowzee
0
171
Member Avatar for sifuedition

What is wrong with this: [code] for(int b = 0;b < c.length();b++) { temp[b] << S.Pop(); // or temp[b] = S.Pop(); } [/code] to have a string made up of the contents of the stack? When I do this and cout << temp, temp is blank. This iterates through the …

Member Avatar for sifuedition
0
90
Member Avatar for vjw757

im about to sign up for some college classes.. one is either going to be java or c++ for beginner. I dont know anything about these languages. Can you guys help me choose?

Member Avatar for chrisbliss18
0
439
Member Avatar for sifuedition

What is happening here? [code] void palindromemgr(ifstream& in, ofstream& out, Stack& S) { string c; //candidate while (true) { cout << "entering first loop" << endl; //debugging line if (in.eof()) break; in >> c; cout << "this is the value in c :" << c << endl; //debugging line for …

Member Avatar for sifuedition
0
150
Member Avatar for Tündi

Hi all! I have a notebook (w/ win2000), my brother has a PC (w/ win xp). The two comp's are connected to the Net (cable modem connection) via a broadband router. The problem is the following: my brother uses DC++ quite often but this is only possible if his PC …

Member Avatar for chrisbliss18
0
133
Member Avatar for winbatch

Why doesn't this compile? I am trying to use multimap and am unsuccessful. [code] #include <iostream> #include <map> #include <algorithm> using namespace std; int main() { multimap<string,long> test; string a="BLAH"; long b=8; pair<string,long> c( a, b ); test.insert( c ); return 0; } CC Test.cpp -o Test "Test.cpp", line 11: …

Member Avatar for winbatch
0
367
Member Avatar for Acidburn

Hey guys its me again! I'm stuck on a logic thing of where to put some code. Basically I want to take an input from the keyboard and store that into an array using a class whilst combining it with the other stuff that the class does. [code] void hangman::getletter(char …

Member Avatar for Drowzee
0
100
Member Avatar for Puckdropper

Hello, I've been trying to write a program for a class I'm taking, and have gotten stuck on part of the assignment. The program is to: >9> Create a template for a safe array. The user will be able to designate the element type and the size of the array. …

Member Avatar for prog-bman
0
147
Member Avatar for JoBe

Hello ladies and gents, I'm reading about the algorithm partial_sum and there are two different versions of this. The first one just calculates cumulative numbers like this: [code] #include <iostream> #include <numeric> #include <vector> using namespace std; int main() { int a[4] = {10, 20, 30, 40}, b[4]; partial_sum(a, a+4, …

Member Avatar for Stoned_coder
0
102
Member Avatar for Tomas Lopez

I'm writing this program for a class and when I tried to compile it I get an error can anyone help me out I can't see to find the problem. Here is The program with the error: [color=blue]1: #include <iostream> 2: using namespace std; 3: 4: 5: 6: int main() …

Member Avatar for Tomas Lopez
0
88
Member Avatar for paradox814

so basically this is what I am doing: myClass a,b,c; a = myClass( ... ); b = myClass( ... ); c = a+b; this is simple enough, but now I have to overload the operator... [code]myClass myClass::operator+ (myClass f) { myClass temp; temp.value1 = value1*f.value1; temp.value2 = value2*f.value2; temp.value3 = …

Member Avatar for Rashakil Fol
0
92
Member Avatar for Coach_Nate

Trying to get this to compile is driving me nuts! Any help is greatly appreciated. I think it's having trouble linking the header to the .cpp files. It's my first program in Dev C++ - I'm used to using Visual Studio. Here's the source for the header header: [code] #include …

Member Avatar for Ancient Dragon
0
108
Member Avatar for Shaun Hannah

I am new to these internet news groups; but I am excited to learn because you people seam to know your stuff!!! I am fresh out of college; where I studied computer science and did very well. I stumbled upon a small business that does pest control. They hired me …

0
59
Member Avatar for sam1

hi first i apologise if this is not the place to post this thread. :) Is it possible to create a couronne game like the one in minilip : [url]http://www.miniclip.com/couronnedeluxe/index.htm[/url] using c++ or any other programming language as java etc. thanx

Member Avatar for bops
0
97
Member Avatar for kavsak

I have a legacy dll which is used to convert data from a datalogger to Access, and was developed with Visual C++ under NT. However, it will not work under Win2k or XP - it runs but all the data is set to 0. I have traced the problem to …

0
37
Member Avatar for katman1

Recently I upgraded from a 16-bit (SB Live) to a 24 bit (Audigy LS) soundblaster card. My c++ program played 16 bit wave images in memory without a problem. I'm trying to modify the code to play 24-bit wave images in memory, but I get nothing out of the sound …

0
53
Member Avatar for Ancient Dragon

Is there a c++ std:: function that will trim trailing spaces from std::string? I know how to do it myself, but I was wondering if anyone knows of something in <altorithms> or elsewhere? Thanks

Member Avatar for Ancient Dragon
0
117
Member Avatar for Acidburn

Hello, I got my array sorted with different words in it [code] #include <iostream> #include <ctime> using namespace std; int main() { cout << "this program will chose a name from a list randomly" << endl; char holdingArray[5][5] = { "John", "Andy", "Matt", "Jane" }; char chosenBuffer[6]; // holds randon …

Member Avatar for Dave Sinkula
0
102
Member Avatar for Acidburn

Hello I figured out my other problem, now left with another 2. One which I beleive is a logic error since if I enter A it will output AA but I cant seem to solve that one. Also the other is that I'm using app (append). How can I delete …

Member Avatar for Dave Sinkula
0
83
Member Avatar for ramcfloyn

Im attempting to do bitwise operations on a character string and want to use the bitset template. I am having some trouble, it doesnt seem to like to be constructed using a char* string or std::string... I'm knew to this particular template. Here is what I'm attempting: std::bitset<3000> Line("abcdefghijklmnop..."); anyone …

Member Avatar for ramcfloyn
0
161
Member Avatar for haruhiko

:) Hi, I'm a newbie here. I just want to know how to change this code so it can count word instead of letter code: [code]#include <iostream> #include <fstream> using namespace std; // count letters 'a' to 'z' in string s void countLetters( string s ) { int pos, sum …

Member Avatar for Drowzee
0
105
Member Avatar for djbsabkcb

What is a two way templatized linked list in C++? Does it mean using syntax below for classes and member functions definitons? [code] template<typename type_variable> [/code]

Member Avatar for djbsabkcb
0
132
Member Avatar for m7r23

I have no idea how to use these two. I tried for 2 hours. And I also read the c++ books, but no luck. Can some body start me out.

Member Avatar for m7r23
0
141
Member Avatar for BenPage

Hi there. I am desperately needing a library that can provide me with basic matrix arithmetic. I am using a MFC VC++7.1 project for which I want the matrix functionality. I Need: >> To multiply matrices >> Calculate determinant of a matrix. >> Calculate inverse of a matrix. >> Calculate …

Member Avatar for Ancient Dragon
0
93
Member Avatar for sifuedition

I need to use a class for a program that reads an input file, prints the file, sorts the list then prints the sorted list. This is for a Programming II class. I can see how to print and sort. My issue is the input file and the array. I …

Member Avatar for sifuedition
0
162
Member Avatar for ultimate_fusion

i am into making games and most games have cut scenes. as i am not passed the 2d stage and dont have a clue about 3d animation i was thinkin it would be easier to get a mate to make a flash movie for my game. so can you play/open …

0
83
Member Avatar for vps

hello everybody I am writing a jni wrapper for c++ api's the c++ dll is on linux, so i get a .so shared library. I am working on windows, using vc++ 6.0. can i include the .so shared library in my workspace in vc++. when i do it i get …

Member Avatar for vps
0
104
Member Avatar for SpS

Hi, Please see the code below. [code]void Allocate( char* s ) { s = (char*)malloc( 100 ); } int main( ) { char* s = NULL; Allocate( s ); strcpy( s,"Test");/*I know that this will fail. b'coz I still have a NULL pointer in s. Initially s was pointing to …

Member Avatar for winbatch
0
101
Member Avatar for SpS

I am back again with a new query...preparing for technical interview questions --------------------------------- Without using sizeof operator,can we find sizeof datatype.

Member Avatar for Stoned_coder
0
444

The End.