49,761 Topics
| |
I am have to create a program for my class. The instructions are to allow a user to input an integer and display the month and day that corresponds to the entered number. For example, user enters 32 and it will display February 1. I must create a DayOfYear class … | |
Hey, i want to display live x and y values on a C++ form in vs2008 and want to control windows mouse pointer through the x and y values my program is generating. Need help. Thanks | |
I've read this on some other questions here at DaniWeb so I've been trying to use the suggestions posted. They don't seem to be working correctly for what I need or I'm seriously confused (probably the latter). Anyways, I'd like to establish good programming practices early to avoid developing bad … | |
Hello! I'm trying to make a simple calculator in Visual C++ and while coding the decimal button, I encountered the error C2228. Basically, I'm checking if the textBox1 (its name!) already contains a '.'; if yes, then it should return; else, it'll add a '.'. To check for that, I … | |
hi all, i was trying to write to a pre existent binary file but every time it would change the size of file and remove all of its contents so what i should i do????? here is an example to what i'am trying to say(it is not exactly the same … | |
I know a lot of c++ but don't know how to apply it in games. What should I do??? | |
I can't believe I'm even having to ask this rather simple question but I wouldn't normally use C++ for this, and I'm caught on a snag. I have some files filled with many entries like this (from unix time command): [code] real 0m0.475s user 0m0.091s sys 0m0.028s [/code] For each … | |
Can I possibly download .exe file from my server with winAPI? like [url]www.google.com/test.exe[/url], as I got exe in my webserver what I want to download. | |
[CODE]#include <iostream> using namespace std; class Player {protected: int health; int mana; public: Player :: Player() { health = 0; mana = 0; } Player :: Player(int Health, int Mana) { health = Health; mana = Mana; } int GetHealth() { return health; } int GetMana() { return mana; } … | |
Hi again, I'm back, with another question about my calculator program (which I got to work, yay!) Why does the following program not work (when the one after it does): [CODE] #include <iostream> using namespace std; float x; float y; char z; int add() { cout << x << " … | |
Hi everyone, I have a "This should be simple!" kind of problem. I need to do a little socket programming on a SunOS machine. I went back to an old school assignment I did years ago, cut-n-pasted that code, intending to basically cannibalize it for the program I need to … | |
Visual C++ is an absolutely big environment. Currently, I'm working on windows forms applications. I tried to search for tutorials but the only thing I found was scattered information in MSDN Microsoft website. How is it possible to learn windows forms separately?Is there a book out there? Anyway, I'm going … | |
I have a small test program made, and it actually fully works. It connects, and you can send messages back and forth.....but for some reason, when I call connect(), It returns SOCKET_ERROR, but connects, and works fine anyways. Does anyone know why? here is the code: see lines 160, 161 … | |
I have a problem where I need to be able to create an array using the data from the text file. The first line of the file is the array size and the following values need to be put into structs. There may be more than one array per txt … | |
I'm using dev-c++ 4.9.9.2 version and allegro 4.4.0.1 version. I created a console project and done what DTV said in [url]http://www.daniweb.com/forums/thread248782.html[/url]. But i cant found liballeg.a so i add liballeg.dll.a. Then i try some example from [url]http://www.gillius.org/allegtut/index.htm[/url] but there is problem of alleg_init undeclared error raised. I had try other … | |
how to read txt file binary data and store it in array for further use. this use the concept of data file handling. plzzz bhelp me the way out as soon as possible. | |
Hi there! I have a task - to compare 2 std::lists without taking elements order into account. That is, lists A-B-C-D and D-C-B-A are equal, but A-B-C-D and A-B-D-E aren't. We start with the following code [CODE] class T { ... public: bool operator= {...} } bool compare_lists(const std::list<T>& list_1, … | |
So, my main goal is to modify a MIPS simulator to display the contents of the register file during run time. I searched around in the simulator's cpp files and this is what I've determined: There is a file called "ThreadContext.h" which contains the lines: [CODE] typedef long ValueGPR; ... … | |
Hi, i'm doing a project in Visual C++....in Portuguese....i'm hoping you can help figure out the problem eventhough it's not in english... here is the whole code....incomplete in the int main and it's missing some functions but i wanted to solve this errors before i keep going CNoFila.h: [CODE]include <iostream> … | |
Hello... In strings i learned how to sort about numbers... the question is, how does one sort letters? there are some sort in alphabet here in Daniweb but i cant understand its process is Letter A > than Z? is the computer using ascii values? isn't A(65)< Z(90)? if in … | |
Hi all, I'm in a C++ course right now and I'm having a bit of trouble getting my virtual function to work correctly. Specifically, trouble with the 2 pointers I have for 2 separate menu displays for my Hangman game. I have 3 *.h and 3 *.cpp files and the … | |
Hi all, I am in need of converting my java code to c. Do u have any idea about the converter software like c to java? Thanks. | |
A short question: how do you implement a data structure like list using STL ? | |
HEre is my C++ program I made.... first I will put the directions and then the program. I cant seem to compile it for some reason so can anyone tell me what I did wrong please!! Write a C++ program that does the following. Besides #include <iostream>, you will need … | |
[CODE] #include <iostream> #include <string> using namespace std; int main() { string character; cout << "capacity: " <<character.capacity() << endl << "Input a sequence: \n"; getline(cin,character); string reversestring; int counter = 0; for(int i = character.length() - 1; i >= 0; i--) { reversestring[counter++] = character[i]; } cout << reversestring; … | |
Both the arrays contain 1750 characters each and the difference needs to be stored in third array. | |
Hi, I am trying to solve a problem. But when I execute it, it is just like halt and not further processing...... Here is my program function [code] void utility() // Calculate the utility for users for both period Fun5 { double x,y,z,utility1,utility2; double delaycost = 10; ifstream inFile3,inFile4,inFile5,inFile6; ofstream … | |
Hi, I wrote a function as part of a homework assignment, but all it seems to be outputting is 1.#QNAN (I know what this is, I just can't find the cause of it). Here is the function: [CODE] double length ( const int a[], int size ) { double length … | |
I am getting the following errors on my code below. Any help would be appreciated. 69 expected primary-expression before '>>' token 71 `next' undeclared (first use this function) 86`Total' undeclared (first use this function) 86 expected `;' before "Gross" #include <iostream> #include <iomanip> #include <string> #include <fstream> #include <cstdlib> using … | |
i am really bad at programing and i need help with this problem: Program Description: A somnambulist begins walking aimlessly, starting at his bed. He takes N steps. Each step taken is either north, east, south, or west. How far will the somnambulist be from his bed after N steps? … |
The End.