49,767 Topics
![]() | |
[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 … | |
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; … | |
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 … | |
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? | |
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 … | |
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 … | |
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: … | |
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 … | |
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. … | |
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, … | |
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() … | |
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 = … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
:) 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 … | |
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] | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
I am back again with a new query...preparing for technical interview questions --------------------------------- Without using sizeof operator,can we find sizeof datatype. |
The End.