49,761 Topics

Member Avatar for
Member Avatar for usafsatwide

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 …

Member Avatar for wisaacs
0
3K
Member Avatar for Member 785530

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

Member Avatar for jonsca
0
112
Member Avatar for SacredFootball

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 …

Member Avatar for Lerner
0
209
Member Avatar for shave31

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 …

Member Avatar for Danny_501
0
222
Member Avatar for vlad44

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 …

Member Avatar for vlad44
0
110
Member Avatar for nwhitfield

I know a lot of c++ but don't know how to apply it in games. What should I do???

Member Avatar for nwhitfield
0
118
Member Avatar for Daqpan

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 …

Member Avatar for dusktreader
0
131
Member Avatar for Silvershaft

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.

Member Avatar for Excizted
0
72
Member Avatar for ChaseRLewis

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

Member Avatar for dusktreader
1
161
Member Avatar for Member 784453

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

Member Avatar for Member 784453
0
151
Member Avatar for phummon

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 …

Member Avatar for phummon
0
276
Member Avatar for Member 784689

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 …

Member Avatar for Ancient Dragon
0
165
Member Avatar for VBNick

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 …

Member Avatar for VBNick
0
217
Member Avatar for adaniel058

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 …

Member Avatar for adaniel058
0
364
Member Avatar for Member 785485

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 …

Member Avatar for Excizted
1
141
Member Avatar for mayank101505

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.

Member Avatar for Excizted
0
87
Member Avatar for intelfx

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

Member Avatar for intelfx
0
3K
Member Avatar for dansnyderECE

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

Member Avatar for Excizted
0
182
Member Avatar for Member 785147

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

Member Avatar for Member 785147
0
221
Member Avatar for Anyzen

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 …

Member Avatar for jonsca
0
87
Member Avatar for BLKelsey

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 …

Member Avatar for mitrmkar
0
133
Member Avatar for Member 785468

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.

-1
50
Member Avatar for vbx_wx

A short question: how do you implement a data structure like list using STL ?

Member Avatar for Nick Evan
0
39
Member Avatar for maira74

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 …

Member Avatar for NP-complete
0
234
Member Avatar for ChaseRLewis

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

Member Avatar for ChaseRLewis
0
166
Member Avatar for HAIDER69

Both the arrays contain 1750 characters each and the difference needs to be stored in third array.

Member Avatar for HAIDER69
0
3K
Member Avatar for Rocky111

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 …

Member Avatar for Ancient Dragon
0
147
Member Avatar for mebob

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 …

Member Avatar for mebob
0
109
Member Avatar for sisterjo

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 …

Member Avatar for mrnutty
0
182
Member Avatar for Member 785122

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

Member Avatar for Excizted
-1
86

The End.