- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 20
- Posts with Upvotes
- 18
- Upvoting Members
- 13
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
I have to create a program that asks a person to enter a 2 digit number (10-99) and convert it into words. I've been working on this for days and I still don't see what I'm doing wrong! PLEASE HELP ME!!! EXAMPLE: 27 twenty-seven [CODE]#include <iostream> using namespace std; int … |
|
i have to get 2 numbers (each of length 20 digits) from user and have add them and display the result (using arrays) . i have no idea how to add such a long digit number...please tell me how can i add both numbers. your quick response will be highly … |
|
Hey guys, I just learned the very basics of arrays and I have to write this program of a tic-tac-toe game. The requirements are this: Write a modular program that allows two players to play a game of tic-tac-toe. Use a two-dimensional char array with 3 rows and 3 columns … |
|
|
|
I have a snippet of code that's 37 lines long, I can't, for the life of me, seem to get it working. It compiles fine, no errors, I've had 2 friends run through it and nothing, is it just an issue with my compiler(CodeBlocks)? Long story short I really just … |
|
Hi, I've been trying to write a converter that converts several units. I want it to be able to prompt the user to retype an input if they type an invalid input... I'm struggling with this part. This is what I have so far. [ICODE] #include <iostream> #include <iomanip> #include … |
|
Hello everyone! I want to add a licence expiration feature in my application (written in visual c++). When the licence expires i would like my application to generate a random numerical key which will be sent to me by the user. Using this key and a personal key-generator i would … |
|
Hello, I am working on a script that reads each individual character from a txt file and then outputs it depending on whether it's in the alphabet or not.. The problem is, it won't output spaces or anything apart from the string.. e.g. The text file reads: [code] Hello, my … |
|
Hi everyone! When i compile my small piece of code it gives me the error [COLOR="Red"]C2512 : No appropriate default constructor available[/COLOR] this is my definition of class person: [CODE] // Person.h // A class defining a person #pragma once #include <iostream> #include <string> #include <functional> using std::cout; using std::endl; … |
|
In this code i would like to store the values that are being outputted. [CODE] fstream filestr; char check[4]; filestr.open("D:\\bio.pdf", fstream::in | fstream::binary); if(filestr.is_open()) { int i; char check[4]={0}; for(i=0;i<4;i++) { filestr.read(&magic[i],1); [COLOR="Red"]cout<<hex<<static_cast<int>(check[i])<<endl;[/COLOR] //<-- This LINE } } [/CODE] The numbers that are printed here i would like to save … |
|
char experiment = 'Q' is what I got, however if I were to type in "AAA" or simply more letters than one then it will bug out a bit for me. Is there some kind of similar text to this but for char: [CODE] int mainval; while(true){ cout<<"1. Start game"; … |
|
I have a hw problem that has me baffled. Im sure It is not a big deal, i just am not that familiar with c++ yet. I am tasked with assigning a char value to rate an employee if I enter certain char's i should display a specified string. and … |
|
I don't tend to use Arrays when programming in C++ because I think that vectors are a lot easier to use. The problem is that now I have to use arrays. I'm creating a game using SDL. I'm trying to create the artwork in code using pixels on the screen. … |
|
Hi All.. I using VC++ 6.0..with windows XP.. I have bmp image which I would like convert it save as jpeg format.. can anyone teach me the steps..?? Thank you.. Shizu.. |
|
I am trying to move a ball using time. What do I need to know to move the ball? How can I move the ball 20 pixel per second? [CODE]#include <allegro.h> int ballx = 320; int bally = 240; void ball(){ if(key[KEY_RIGHT]){ } else if(key[KEY_LEFT]) { } acquire_screen(); circlefill(screen,ballx,bally,5,makecol(255,255,255)); release_screen(); … |
|
Not sure what the exact title should be. But at a point in my text game. I want to have multiple selections. But whenever I put the code (shown below), compile the program, and run it I get this. It goes through my main menu, new game, all the stuff … |
|
Hi, Ive written a program which is capable of sorting an array of ints e.g. array[6] = {4,6,-1,0,6,4} however i want to expand this so it will be able to order chars as well. With my code as it is, it will order chars correctly i.e. sort the numbers out … |
|
|
I am troubled by my very long code for a movie reservation program. A friend of mine told me that I can shorten my very long code using functions. What made my code very long is the switch statement that I used which is composed of 200 cases. Sorry because … |
[CODE]#include <iostream> #include <cmath> #include <iomanip> using namespace std; int divides(int,int); int main () { int count = 10; //int prime = divides(count); int p = 0; // number of primes cout.setf(ios::fixed,ios::floatfield); cout << setw(6) << "NUMBER" << "\t" << setw(8) << "DIVISORS" << endl << endl; while (count<=50) { … |
|
hello, I'm fairly new to programming in general, and i'm having some trouble figuring out how to use a stack and queue to check to see if a word or certain order of numbers/letters form a palindrome or not. My logic is to read in the original string, push/pop characters … |
|
If I'm not mistaken using library that is GPLed will force your app to go GPL. Is there a way to get away with MySQL GPL licence and use it in closed source (Not necessarily commercial)? Two scenarios here: 1. libmysqlclient is linked dynamically 1. libmysqlclient is linked statically Thanks! |
|
can i make a prototype for a class member function outside of the class declaration? i tried this: but it didnt work [CODE]class cls; void cls::dosomething(); class cls { public: void dosomething(){} };[/CODE] thanks |
|
Hi guys, first post here. I decided to come here because it looks really friendly. Ive looked around on the internet, but I dont really understand how to do this. Take note that I am just beginning in c++. (Few days practice), so i decided to try to make a … |
|
so im taking the advice of 1ML, seems like a smart guy, and starting a second thread for the controversial, main calling, system calling, devil code, anyway i did take your guys advice and cut out the main calls and reduce everything to one fuction. however! ladies and gentlemen we … |
|
[CODE] #include <iostream> #include <iomanip> #include <cstdlib> #include <ctime> using namespace std; int main () { int arr[9][9], n; srand(time(0)); for (int i=0; i<9; i++) { for (int j=0; j<9; j++) { n = rand() % 9; if (arr[i][j] == n) { n = rand() % 9; arr[i][j] = n; … |
|
I'm trying to write a program that outputs the cent symbol (¢) in Visual Studios 2010 and when I copy and paste the symbol into my text it outputs a completely different symbol. I've also tried using \u00A2 and I still get a different wacky symbol. What is the C++ … |
|
Hello again: I am having trouble declaring my variables. Can you please show me what I am doing wrong. The homework problem ask for me to use the "if" statement also, kinda having a few problems with that. Please see the question and my code below. Thank you for your … |
|
Hi I need help on this please.I have to write a void function that reads data from the following file:5 2 2 670.60 6 4 2 890.80 2 2 0 220.00 10 8 1 1340.60 10 4 3 1430.70 4 0 0 460.30 5 3 1 700.00 7 5 2 … |
|
how to get from table only one column and its downstair data? from this: [URL="http://lashatt.comoj.com/table1.JPG"]http://lashatt.comoj.com/table1.JPG[/URL] show only this: [URL="http://lashatt.comoj.com/table2.JPG"]http://lashatt.comoj.com/table2.JPG[/URL] what will be mysql code of this? |