49,761 Topics
| |
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. | |
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. … | |
| 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 … |
How to set font style color and bg color; the online examples are very tough ; can ayone give me a easy and understandable code ?? | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
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 … | |
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. … | |
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 … | |
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 … | |
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 … | |
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; … | |
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 } … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
How can i read in an array and then count the number of words that end in punctuation? Thanks for any insight. | |
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 … | |
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 … | |
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 … |
The End.