49,761 Topics

Member Avatar for
Member Avatar for kahn1

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 = ' ', …

Member Avatar for JohnKnox
0
99
Member Avatar for sgw

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 …

Member Avatar for sgw
0
129
Member Avatar for alone2005

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& …

Member Avatar for farag
0
186
Member Avatar for 31N513N

Need help writing a program that reads a series of 5 integers and determines the largest and smallest.

Member Avatar for JRM
0
108
Member Avatar for atish00

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() …

Member Avatar for atish00
0
144
Member Avatar for cosmos22

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

Member Avatar for Ancient Dragon
0
101
Member Avatar for mail2indar

Hello everyone, I want to develop browser plugin. How i should start. Thanks, Indar

Member Avatar for Ancient Dragon
0
42
Member Avatar for mrjoli021

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 …

Member Avatar for mitrmkar
0
112
Member Avatar for juanbuffer

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 …

Member Avatar for juanbuffer
0
649
Member Avatar for jesseb07

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 …

Member Avatar for jesseb07
0
172
Member Avatar for sgw

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 …

Member Avatar for jesseb07
0
118
Member Avatar for gajaykrishnan

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...

Member Avatar for mail2indar
0
197
Member Avatar for Mirtunjay

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 …

0
44
Member Avatar for rsk8332

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 …

Member Avatar for carnage
0
89
Member Avatar for Spencicle

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 = …

Member Avatar for vmanes
0
91
Member Avatar for Jennifer84

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 …

Member Avatar for vijayan121
0
96
Member Avatar for Moporho

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 …

Member Avatar for Moporho
0
97
Member Avatar for orangejuice2005

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 …

Member Avatar for Lerner
0
1K
Member Avatar for Jennifer84

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 …

Member Avatar for Jennifer84
0
105
Member Avatar for curt1203

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, …

Member Avatar for curt1203
0
292
Member Avatar for cosmos22

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, …

Member Avatar for cosmos22
0
140
Member Avatar for Alexandros

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. …

Member Avatar for Narue
0
72
Member Avatar for conklin

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; …

Member Avatar for conklin
0
104
Member Avatar for Jboy05

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.

Member Avatar for Jboy05
0
101
Member Avatar for d0ugg

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 …

Member Avatar for d0ugg
0
244
Member Avatar for farag

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

Member Avatar for abrou
0
113
Member Avatar for knewc

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 …

Member Avatar for Dave Sinkula
0
92
Member Avatar for unclepauly

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 …

Member Avatar for vijayan121
0
109
Member Avatar for jrivera

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 …

Member Avatar for vijayan121
0
99
Member Avatar for cosmos22

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 …

Member Avatar for VernonDozier
0
98

The End.