49,761 Topics
| |
I am having some problems with solving this game. any ideas #include <iostream> [code=cplusplus] int main() { char a = ' ', b = ' ', c = ' ', d = ' ', e= ' ' , f = ' ', g = ' ', h = ' ', … | |
Hi, Let's say x=12.34, y=567.89, z=6.38, and we want the output this way: _____$12.34 ____$567.89 ______$6.38 [COLOR="Red"]right-aligned[/COLOR] [COLOR="Green"]with the decimal point lined up[/COLOR] (where the ___ are [I]spaces[/I]) In other words, [U]all[/U] the numbers are right-aligned [U]and[/U] [I]immediately[/I] following "$". How to do that if you don't know what values … | |
Hi, anyone can tell me what's wrong with my code? the only part has problem is the function overload << operator, any help is welcome. #include <iostream> using namespace std; template <typename T, int SIZE> class array { T data_[SIZE]; array (const array& other); const array& operator = (const array& … | |
Need help writing a program that reads a series of 5 integers and determines the largest and smallest. | |
The programme you guyz helped me with for the past 3-4 weeks is done.......It was done last week but I had exams. hrez the code :) you guyz can execute and see it :P Thanx ancient dragon and nieke [code=c++] // password fuction #include<iostream.h> #include<conio.h> #include<stdio.h> #include<process.h> #include<string.h> int password() … | |
Hi. I would like to know about how you program a command that forces an operation. For instance, the command window might prompt the user of something that they already know, rather than bothering to hit Y and enter, it does it for them, forces the operation. Thanks | |
Hello everyone, I want to develop browser plugin. How i should start. Thanks, Indar | |
I wrote a class and I want to give it to someone to use, but I dont want them to have access to the source code. My class is split into 2 files a .h and a .cpp how can I block them from seeing the cpp file only the … | |
Hi everybody, I'm developing a daemon in c/c++ and I'm having some trouble with shared memory. I create different processes that have to access the same memory region. Everything was OK until I decided to use a vector containing objects. I read that I have to define an allocator specifing … | |
hello, I'm relatively new to C++ (but not to programming) so I wasn't sure how to do this in C++. My brother wrote a bash script which is used primarily to transfer files between computers using rsync which he asked me to convert to C++ so that it can be … | |
Hi, If I want to print several numbers, say 12.3, 24.038, 154.9181, 0.4778--anyway, just all kinds of numbers, how can I print all of them with [U]fixed number of decimals[/U], say two decimals, that is, the output will be: 12.30, 24.03, 154.91, 0.47... ? The "setprecision(...)" doesn't work because it … | |
i am programming on linux platfrom and i want making a plugin for a web browser. can u tell me the basics of plugin programming on c++/ Qt in linux.? I dont have any idea of how to start making a plugin kindly guide me... | |
I have two lan cards in my Server in such a way that Lan Card a1 is connected to internet and holds Public IP infomration and Lan card a2 is meant for private internal network and holds internal IP information and connects to client machines in my internal network. In … | |
Hi, Suppose I have a character array with the elements B,A,A. Now I have another character array with the elements A,B,B,B,A,A. How do I match the pattern B,A,A of the first character array with that of the second character array so as to produce the following output: A B B … | |
No matter which options you enter, it always displays the result for paper beating rock. [code=cplusplus] #include <iostream> #include <iomanip> using namespace std; int main () { /* declaring variables */ char first; char second; char paper = 'p'; char paperP = 'P'; char rock = 'r'; char rockR = … | |
I am using a progressbar in .NET to show progress for an operation. In this forloop I am reading 3 files that takes about 20 seconds. Now I have done a formula: (out / count) * 100 that will show progress. So for the first file wich will be (1 … | |
Hello, I am trying to create a program that asks a user to input a integer. That integer will dispaly "*" (i.e. enter 4 diplay - ****) This is what I came up with so far to no luck! [code]#include "stdafx.h" #include <iostream> using std::cout; using std::cin; using std::endl; int … | |
We were given a task, to familiarize ourselves with stacks and queues, to write a program to solve a maze problem. We are given text files with pre-defined values letting us know the size of the maze, the mouse's position, the cheese's position as well as the value each cell … | |
I have a wondering here. This code I have below is working great except of one thing that doesn´t make sense to me. I use a while-loop inside a for-loop as seen. The for-loop is counting from 1-49 and for each count the while-loop will read a .txt file and … | |
I once again am having trouble with this program. I really thought i understood this right off the bat but once i got into it, there is a lot of little technical things my professor wants in it. Like the functions and generating random numbers. Any help would be awesom, … | |
Hello, I was wondering how you might go about detecting a drive letter, such as D for DVD drive, if you wern't to run it on your own computer. I have programmed something that picks a certain drive letter in an attempt to match it to theirs. The reason is, … | |
Can anyone please help how i can do the following program? If there is actually a similar program in C++ section can anyone post me it? I will appreciate it! [B]Task: Calculate 2 floating numbers choosing the option you want from the menu as follow: 1. Addition 2. Subtraction 2. … | |
program 1: #include <iostream> using namespace std; class person { char name[30]; int age; public: void getdata(void); void putdata(void); }; void person :: getdata(void) { cout << "Enter name"; cin >> name; cout << "Enter age"; cin >> age; } void person :: putdata(void) { cout << "\nName" << name; … | |
How do I go about writing a user-defined function named Get_Inputs that when called, the function will prompt for three integers and send these numbers to its calling environment. | |
Hello All, I'm creating a program that reads a file.dat and I need to input that in a matrix, it can be 2x2,3x3,4x4 or 5x5. I'm not exactly sure how to do that. The file.dat looks like this: 2 1 2 3 5 3 1 3 8 5 7 3 … | |
If you know a certain c++ library treat with excel sheet with efficient way that can read acertain row or columns Support me by it | |
Hello, i made this code, it is giving me random numbers, but 1 too many, and a couple numbers out of the range..please help!!! [code] #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main (){ int x; //range number 1 int y; //range number 2 int m; //how … | |
can someone please try and explain something to me... i have 2 functions, lets call them FuncA and FuncB. FuncA calls FuncB, and FuncB does some stuff then simply returns. both functinos are placed in try...catch statements: [CODE] void FuncA() { try { FuncB(); } catch { trace("FuncA caught exception … | |
This is Homework. I have been working on a tournament program. Currently the tournament class gets user input and instantiates a player class and a game class. The game class then calls the board class where it instantiates a boardconfig class object. At this point Is where I get my … | |
I started a windows application, that used the void hide.. function to hide the command window. I compiled it, and it worked. Why is it, that if I compile the source file, and not the project file, it keeps the window open? Dispite the fact the coding is exactly the … |
The End.