49,761 Topics
| |
What library is there in C++ that has the ServerSocket, Socket,MulticastSocket, Datagram & DatagramSocket classes?it is java.net in java i guess :( | |
I wonder if I have something like this where Replace is the same as/"contains": Number == 5. My question is if it is possible to put this: Number == 5 to a std::string in any way through Replace ? [code] #define Replace Number == 5 [/code] | |
[code] #include <iostream> using namespace std; typedef unsigned short ushort; typedef unsigned long ulong; ulong power(ushort, ushort); int main() { ushort x,y; ulong z; cin>> x; cin>> y; z=power(x,y); cout<< z; return 0; } ulong power(ushort i, ushort j) { if (j==1) return i; [B]else return (i * power(i, j-1)); … | |
Hi everybody, can you help me to solve this problem ?!! I need your help please .. [COLOR=#000000](1) [/COLOR][COLOR=#000000]Define a structure named menuItemSpecificationType that stores ingredients in a menu item (string [4]) and a brief description of the item (string).[/COLOR] [COLOR=#000000](2) [/COLOR][COLOR=#000000]Define a structure named menuItemType with four components: num … | |
I am reposting this thread because the last time I posted it no one understood it and some people with a desire to help me posted solutions that didnt solve my problem. This actually caused the post count fo the thread to reach 5 which caused other people not to … | |
So I have a program i am writing. relatvely simple, but i am not sure what to do. the first I am trying to make a program that displays loan amount, monthly payments, and number of payments based on the input (annual interest rate), (number of payments), and (amount of … | |
Hello, I'm designing a C++ Program for a connect 4 game. I have the matrix set up, the test to determine if there is a winner, and now I need to design the computer to go against the player. This seems to be quite a challenge. First, I need to … | |
How to count> Is true I do this programming? [code=C++] { int count; count=0; count++; for ( int i = 0 ; i < students.size (); i++ ) { for ( int k = 0;k<students.at(i).examcode.size(); k++ ) { if (students.at (i).examcode.at(0)=0) { cout<<count++<< " "; } } } } [/code] | |
I might wonder if I have an int vector like this and I want to achieve the averagevalue for Element 0-8 wich is ((1+2+3+4+5+6+7+8+9) / 9) = 5 What method could be used for this ? std::vector<int> Number(10); Number[0] = 1; Number[1] = 2; Number[2] = 3; Number[3] = 4; … | |
hey evryone; I've created a matrix class (called fmatrix), and im facin a problem with one of the functions: read()......i cannot fill the matrix through keyboard as an input device and keep getting this error: error C2679: binary '>>' : no operator defined which takes a right-hand operand of type … | |
I have been doing c++ for somewhere between 1 1/2 and 3 months (I'm awful keeping up with time). I have a program (one of my first) that I have taken and added pieces to since I made it and it has come to be the piece of work it … | |
Hi there, IN C# I use this way to define any variable (X for example) [code] using System; /// <summary> /// Summary description for Class1 /// </summary> public class Class1 { private _X; public Class1() { // // TODO: Add constructor logic here // } public String X { set … | |
We're doing functions in our class, and we're supposed to write a function that displays a four-choice menu (with four character choices and a description of that choice). Then, it is supposed to output that character as a lower-case letter. If the character they enter isn't one of the choices, … | |
Hey actually when we are usin the random function we generally tend to take all the no.s eg.random(5) 012345 but i wanted to take random from only a few no.s like 3 5 7 5 9 and not ny other numbers.. cud neone help me | |
The following is the code for Serial comm in Dev Cpp (OS :WinXp) .It is a project .It has a main.cpp ,serial.cpp and serial.h Serial.cpp [code=c] /* Serial I/O class using the Win32 file funcions for compatibility with all versions of Windows (including CE) */ #include "SFile.h" #include <stdio.h> #include … | |
For our assignment, we are supposed to use a file called functions.o. Our instructor told us it would compile with our .cpp files using the command, g++ functions.o * .cpp , but it isn't working. Is there something wrong with this command, or is there somewhere special I'm supposed to … | |
hey i just created a game of hangman in c++ with multiplayer facilities and stuff...but i wanted to add some music to it...could anyone help me?? | |
I need to create a guessing number program that notifies the user whether or not they're guess is higher or lower to the random number created by the program. My problem is that the program only recognizes that the guess the user makes is lower than the random number. If … | |
Hi all, I am writing a program to make a binary tree. I have all the class/structure part fine, I just want to make the program unbreakable. I am asking the user to input strings, and I am putting those strings into the tree as all lower case (I also … | |
| hi.. i'm having trouble with my project.. i keep getting "Unhandled Exception" [code=c++] # include <conio.h> # include <stdio.h> class bank { float x; public: void deposit(); void withdraw(); void disp_det(); }; void bank::deposit() { float more; printf(" enter the amount to deposit: "); scanf("%f", more); x += more; } … |
Hello all: I create a simple source file in VC++ , I tried something simple,there is two strings: string1:MICROSOFTCPP string2:HELLO I want to write a code to make string2 is equal with string1,so it must be string1:MICROSOFTCPP string2:[COLOR="Green"]HELLO[/COLOR][COLOR="Red"]HELLO[/COLOR]HEL so it seem the string2 its repeat itself until it's length is … | |
[code=c++] #include <iostream> #include <cstdlib> using namespace std; double amountSold; double galSold; double price; int start; int pump; int main() { price = 2.85; galSold = 0; pump = 1; while(pump==1) { cout << "Sales Total " << amountSold << endl; cout<< endl; cout << "Gallons Of Gas Sold " … | |
hi. i am working on an assignment where i have a file that has a list of numbers. using those numbers, i should be able to create a program, where when prompted, i can find the mean of the numbers from that file, the biggest numbers, etc. the output would … | |
im a biginner level in Visual C++ version 6.0 "how can i Write the Program ”Minesweeper”. On field by size NxM Computer by casual image places X mines. The user will alternately assign the number of cell but computer gives him amount of mines, residing in nearby cells. If and … | |
Hi, I am trying to understand why this bit of code is performing the way that it is. I am a novice at C++ and missed this on my test. The teacher will not discuss anything from an exam so that leaves me to try and hash it out myself. … | |
Hello, well am just a beginner in c++ n my question is that how to you input in a void function the ranking of a student result?? Ive implement a program where we have to input the student marks and calculate the ranking/grading n calcutale the CPA? Can any1 provide … | |
Here's this program i write to uppercase proper nouns in a file. It opens three files: 1. is the file to uppercase. 2. is a list of proper nouns to uppercase. 3. is a list for proper nouns preceeding words that excludes proper nouns to be uppercased. I rechecked it … | |
I know how to generate numbers like 1-20, 1-1000 etc... but Im trying to figure out how to generate random letters from A-Z? any help please? |
The End.