49,761 Topics

Member Avatar for
Member Avatar for eranga262154

Hi all, I already convert a C++ project to C# project. It's fine and working ok. On C++ I use DWORD data type. But in C# for that I used just a int value. Is that ok. Is there compatible data type which I can use for my project. Thanks.

Member Avatar for eranga262154
0
87
Member Avatar for hockeyplayer051

Hello, I had ran into a very difficult problem in my CS110 class in University. The problem asks us to use if statements to take 5 random inputted float numbers: ie. 5.63, 10.5, 16.7, 20.6 & 10.9 and take the median value, Ie the value that is in the middle. …

Member Avatar for Ancient Dragon
0
93
Member Avatar for allmusic76

Hi folks, Can you help me try to figure this one out? I am trying to create a program that will accept a string from a user input ( cin) in the HH:MM:SS format, and then convert this into seconds. However, I also want to avoid "fat-fingered"input by creating an …

Member Avatar for Ancient Dragon
0
100
Member Avatar for atish00

How to set font style color and bg color; the online examples are very tough ; can ayone give me a easy and understandable code ??

Member Avatar for hammerhead
0
122
Member Avatar for Sardor

I'm a new in programming. Recently, I began to learm the language C++. One of my good program to make is connecting PC's by telephone lines. Please, inform me about how to use the device modem by the C++. Write some examples, if possible.

Member Avatar for Ancient Dragon
0
100
Member Avatar for Grub

Hi, I have written a Solitaire game program and have made a history of moves so the user may either go back on moves and make another choice or go forward after having gone back. Now I am using a vector to store the moves. When the user has made …

Member Avatar for Jim Larkin
0
155
Member Avatar for Penguin506

I'm doing an assignment for C++. I'm to write a program that will help elementary school students learn multiplication. Use rand() to produce two integers between +10 and -10 inclusive. The program should then use those numbers to output the question. So far I haven't put the functions in, i'm …

Member Avatar for Jim Larkin
0
218
Member Avatar for atish00

so far I ask user for number of terms : [code=c++] cout<<"Enter the number of therms in the array \n\n"; cin>>x; for(i=0; i<x; i++) { cin>>arr[i]; } [/code] But It looks preety non-user friendly, I wanna input it just like we enter a string. We the user should hit shift …

Member Avatar for atish00
0
107
Member Avatar for Mido ™

i want do this pro that looks like phone index but i have problems and i dunno how to fix this its console application - c++ source file plz help me quikly [CODE]#include<iostream.h> void main() { char names[10],n; double tel[10],tel1; int x,i,f=0,f1=0; cout<<"1 - add new rec"<<endl; cout<<"2 - search …

Member Avatar for hammerhead
0
222
Member Avatar for chocl8drop

I am working on a program that implements a complex number class. I will include the main part of the code. I am getting the following error and can't figure out why. [code] error C2143: syntax error : missing ';' before 'namespace' [/code] Here is the beginning of the program. …

Member Avatar for chocl8drop
0
736
Member Avatar for sgw

When there are several cout statements, if the first cout statement has, say, << fixed << showpoint << setprecision(4), then all the subsequent cout statements *without* these settings will also have that effect. For example, in the following program, [CODE]cout << "sin(" << angle << ") = " << fixed …

Member Avatar for sgw
0
13K
Member Avatar for Infeligo

Hello to everybody. I'm trying to solve an ACM task #755 called [URL="http://icpcres.ecs.baylor.edu/onlinejudge/index.php?option=com_onlinejudge&Itemid=8&category=9&page=show_problem&problem=696"]487-3279[/URL]. It's about telephone numbers, quite straightforward. But still something is wrong in my code, because the automatic control says "Wrong answer" and I can't find on which input it fails. I tested it on Windows using MinGw. …

Member Avatar for Ancient Dragon
0
192
Member Avatar for Slade

Hi Guys, I'm writing a program for work which uses the HtmlTextWriter to output html files (it's a reporting system). In each file I want to render a style tag at the beginning and to do this I'm using the HtmlTextWriterStyle enumeration. This means I need to convert any value …

Member Avatar for Slade
0
149
Member Avatar for Trini89

I just started my C++ course in college and I'm having major trouble I have to write a program that dispenses changes. It has to read the amount paid - amount purchased, and gives the change in dollars, dimes, etc I need some help with this because I am so …

Member Avatar for Lerner
0
92
Member Avatar for rmsv_sen

The main function of my program is to realize a client base to the physical Robot and it receives the parameters from the robot. after some processing it links to the webot environment for visual display. so i have used a two classes with the member functions. i have given …

Member Avatar for Ancient Dragon
0
254
Member Avatar for TMD

ok I am making a maze for my school with gotoxy and getch and 2d character arrays I have 2 errors though when I am compiling it.. here's the source: [CODE=cplusplus]#include <iostream> #include <stdio.h> #include <windows.h> #include <stdlib.h> #include <conio.h> #include <ctype.h> using namespace::std; char moveR; char moveL; char moveU; …

Member Avatar for TMD
0
111
Member Avatar for austinslik

can any body convert this to switch statement thankxxxx.. [CODE=cplusplus] public char CheckDir(int row, int col, int selectedX, int selectedY) { if (row == selectedX) { if (col - selectedY == -2) { return 'd'; } //DOWNWARDS else if (selectedY + 2 == col) { return 'u'; } //UPWARDS } …

Member Avatar for austinslik
0
131
Member Avatar for daviddoria

I have "right" overloading working fine with: Vector Point::operator*( double P ) this would be called with MyPoint*2 and gives the results I would like. However, if I say: 2*MyPoint, it says I can't do that. Makes sense, but surely this can be done! I had trouble googling because I …

Member Avatar for daviddoria
0
91
Member Avatar for daviddoria

I have a class called Point. Point.h : [CODE] #ifndef POINT_H #define POINT_H #include "Vector.h" #include <iostream> class Point { friend ostream& operator<<(ostream& output, const Point& p) //must have global scope { output << "x: " << x << " y: " << y; return output; } [/CODE] The compiler …

Member Avatar for daviddoria
0
83
Member Avatar for jimJohnson

I am getting this error when debugging can anyone tell me what I am doing wrong....keep in mind I am not finished with the program 1>Project 3.obj : error LNK2019: unresolved external symbol "int __cdecl Get_Number(int)" (?Get_Number@@YAHH@Z) referenced in function _main [code=C++] #include <iostream> using namespace std; double Get_Character(); int …

Member Avatar for VernonDozier
0
85
Member Avatar for maggz

hi..i am new progarmmer for c++ and i really need help coz i have lots of problom while doing progamming in c++. i need guidance how i can implement my code or if someone could start the code for so it might be easy to continue. i need everything in …

Member Avatar for Ancient Dragon
0
81
Member Avatar for SofMy

Hi, I'm new in this forum and c language, need somebody to correct my programme as below: Question Design and implement an interactive program that reads your yearly gross salary and computes and prints your net monthly take home income. Assume that your yearly gross salary is greater than RM …

Member Avatar for mitrmkar
0
121
Member Avatar for curt1203

Ok i have this assignment almost complete. But after the standard deviation, i am supposed to show the minimum and maximum temperatures and the number of the position of the temperature. I just do not understand how to to that.... [code=cplusplus] //Assignment 6: Computing with Arrays //By: Curtis Davenport 2/24/08 …

Member Avatar for curt1203
0
489
Member Avatar for zipperhead

Hello. I tried to correct segmentation fault bug and I have found out a very strange thing imho: creating new instance with "new" returns address of already existing object, constructor is called and my old object is overwritten. I didn't delete my old object before. Could someone tell me what …

Member Avatar for zipperhead
0
76
Member Avatar for daviddoria

I have a class Vector that needs to have a function that returns type Point, and a class Point that needs to have a function that returns type Vector. I was informed that I needed to use forward references, which I thought I had implemented as follows. I am still …

Member Avatar for mitrmkar
0
108
Member Avatar for carnage

i'm planning on creating a program for reservations (ex. rooms) by analyzing my problem,the things i don't know how to are: validating the date and whether the room inquired is available or reserved for someone else i'm guessing this will require me to create an output file,which i have no …

Member Avatar for hammerhead
0
142
Member Avatar for vankdar

How can i read in an array and then count the number of words that end in punctuation? Thanks for any insight.

Member Avatar for atish00
0
97
Member Avatar for PaKmAn

I'm not sure how far I have left to go with my coding, but after I enter my play then I want the computer to play, it just repeats its play over and over until I control c to get out. [code] #include <iostream> using namespace std; // Leave the …

Member Avatar for WaltP
0
114
Member Avatar for kiwihaha

I wrote a simple bubble game... but it look long and complicated... so any idea to short it down? i heard about class.. but i dunno how to use it.. so is my program can use class? or any idea to short it down? #include <iostream> #include <ctime> using namespace …

Member Avatar for kiwihaha
0
95
Member Avatar for GPXtC02

What is wrong with this function? [code]// /////// // void GetData(int(IDs)[], float(Scores)[][4], int &i) { //GIVEN: One blank ARRAY, one blank 2D ARRAY, & a index variable. //TASK: Function retrieves data from open stream into multiple functions. Stores ID into one structure and all of the student's test grades into …

Member Avatar for GPXtC02
0
254

The End.