49,761 Topics

Member Avatar for
Member Avatar for Clandry

Making Change|Programming Assignment 5 Write a complete C++ program to do the following: 1. Read a single input record from the text le transactions.dat containing the initial number of each coin and currency type in a till from which change for purchases in a shop is to be made. Echo …

Member Avatar for dylank
0
220
Member Avatar for bmos31

I'm having trouble getting a recursion template reduceArray() function to divided elements in an array. I have +,-, and * working fine, but division is not working for me. The function should take the given elements and divide as follows ((((4/2)/7)/1)/9) Here's my code...any tips? [CODE]#include<iostream> using namespace std; template<typename …

Member Avatar for bmos31
0
222
Member Avatar for gotjeff5

Hey I am trying to do a tic tac to game, and im getting a few errors that I don't understand, Please help me. Here is my code: [CODE] #include<iostream> using namespace std; const int num_rows = 3; const int num_colm = 3; void xPlayer(char board[][num_colm], int); void oPlayer(char board[][num_colm], …

Member Avatar for gotjeff5
0
137
Member Avatar for ccube921

I don't know what the problem on line 12 is. [CODE]void mkbrd(void) { for ( int y =0; y<8; y++) //accesses all columns in the array { for ( int x=0; x<8; x++) //accesses all rows in the array { brd[x][y].x= char (65+x); //assigns columns names A-H brd[x][y].y= y+1; //assigns …

Member Avatar for gerard4143
0
71
Member Avatar for sonsofliberty84

I am having some problems finding a good example of a program that runs as a system tray icon, does anyone have one or know where to find a good one with a well readable source code file that I can look at? And I would prefer it to be …

Member Avatar for Ancient Dragon
0
289
Member Avatar for n0de

Hi, my dad asked me two write a litlle program. Nothing special, except i have problems with string to float conversion... Here is the code i wrote: [CODE=c++] #include <iostream> #include <fstream> #include <sstream> #include <string.h> #include <stdlib.h> #include <cstring> #include <iomanip> using namespace std; // main() { string sKBP, …

Member Avatar for n0de
0
241
Member Avatar for David_Omid

Hey guys, once again I have a problem which I can't find a solution for. Basically I want to be able to create my application by writing different pieces of code in different source files, like one for the main form and then one for each group of components so …

Member Avatar for David_Omid
0
102
Member Avatar for Archenemie

Ive made this keylogger because lately my computer crashes ALOT and it records keystrokes in real time, i thought that even if my computer crashes im not going to loose my work, only maybe that last 4 or 5 characters, but the log file gets written to in a seeminly …

Member Avatar for Archenemie
0
145
Member Avatar for jrw89

I've been following a few tutorials to create Makefiles and came across one at [URL="http://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/"]http://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/[/URL] which I managed to get working across some simple functions and programs:[CODE]IDIR = include CC=g++ CFLAGS=-I$(IDIR) ODIR=obj _DEPS = hellomake.hpp DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS)) _OBJ = hellomake.o hellofunc.o OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ)) $(ODIR)/%.o: %.cpp $(DEPS) …

Member Avatar for gerard4143
0
145
Member Avatar for kk33

Hi , my problem is that the "FtpGetFile" function always downloading the same file , even the file is deleted from the ftp server, without restarting my application,here is my simple code [CODE] HINTERNET hInternet; HINTERNET hFtpSession; hInternet = InternetOpen(NULL,INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,0); hFtpSession = InternetConnectA(hInternet, "FTP.drivehq.com", INTERNET_DEFAULT_FTP_PORT, "user","pass", INTERNET_SERVICE_FTP,INTERNET_FLAG_PASSIVE, 0); FtpGetFile(hFtpSession ,"ip.txt", …

0
76
Member Avatar for eri24

Hi, i need help or advice on how to start a code i have to write. This is the details of the program with an example: [url]http://www2.cs.uh.edu/~acl/cs1410/prog6.pdf[/url] Any help or advice on how to go about this would be greatly appreciated.

Member Avatar for eri24
0
218
Member Avatar for fire_

Hello everyone. Is there any MFC function to get my own window handle? I'm creating window with Dialog box without title, so i can't use FindWindow(); Maybe there is something like AfxGetInstanceHandle() but i could get window handle? Thank you

Member Avatar for Rajesh R Subram
0
94
Member Avatar for Mona..

Hi.. I want help in C++, I want to read a file reversly and write it in a new file, how can I do that? Thanks for your time..

Member Avatar for Mona..
0
129
Member Avatar for bob200707

Hello everyone, I was given a code that was not in the correct order. I have the first half of the program in the right order I believe but need help with the rest. The program is supposed to output the total time an employee spent on the job each …

Member Avatar for bob200707
0
99
Member Avatar for krazyito65

[code] class Node { private: int integer; Node *pointer; public: Node(int x = 0, Node *y = NULL) { integer = x; pointer = y; } int getInteger() { return integer; } Node getPointer() { return *pointer; } }; [/code] [code] private: Node *stack; Node *top; int listSize; int pushedValue; …

Member Avatar for krazyito65
0
218
Member Avatar for Fbody

I am trying to sort a vector that is a [B]protected[/B] member of a templated class into a Descending order based on the [I]second[/I] member of the contained std::pair objects. The vector has the following declaration:[CODE]vector< pair <const T, int> > mode; //holds pairs to define the mode(s) of the …

Member Avatar for Fbody
0
3K
Member Avatar for brycematheson

I've been trying to get this stupid function to work for days and just cannot get it. My display looks like this: [code] Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 …

Member Avatar for Lerner
0
160
Member Avatar for realproskater

My problem is that my program doesn't print out the first number in the sequence. Like if i ask it to print out 10 numbers it will only print out 9 numbers and skip the first number that it should start with. example of the output is at the bottom …

Member Avatar for kes166
0
131
Member Avatar for vbx_wx

[code] string& f() { string str = "name"; return str; [/code] I need to return a reference to a string,but i am confused how to return corectly from f(),any help ?

Member Avatar for Ketsuekiame
0
108
Member Avatar for ashu1

hi dani please i have an assignment help me ! what i want see in above title thank you! dani

Member Avatar for Unimportant
-2
88
Member Avatar for 0pawix

[CODE]#include <iostream> #include <string> #include <conio.h> using namespace std; int main(){ string ans =""; string ans2 =""; char ch; cout << "Enter 1stplayer:\n"; ch = _getch(); while(ch != 13){//character 13 is enter ans.push_back(ch); cout << '*'; ch = _getch(); } char chs; cout << "\nEnter 2ndplayer:\n"; chs = _getch(); while(chs …

Member Avatar for rpdm
0
127
Member Avatar for gabs

[COLOR=#444444]hi![/COLOR] [COLOR=#444444]I wrote this code that test multiple windows. I actually need this for another program, but I'm trying to figure out how creating windows work. so in this code I created two windows, and in one of them I create another two. but when I run it, it keeps …

Member Avatar for Ancient Dragon
0
158
Member Avatar for 0pawix

Write a program that will determine the additional state tax owed by an employee. If the state charges a 4% tax on net income determine net income by subtracting a $ 500 allowance for each dependent from gross income. Your program will read gross income number of dependent and tax …

Member Avatar for 0pawix
-2
94
Member Avatar for lennyemp

Hi all buddies, I am the beginner for multithreading in C/C++. So, I copied some example from MSDN and tried to compile it as my first step. Currently I am using DEVC++ IDE. The error is like that: " [Linker error] undefined reference to `sprintf_s' ". Here is the program …

Member Avatar for Ancient Dragon
0
452
Member Avatar for dchunt

I want to run the programs r1-r4 and n1-n4 simultaneously instead of waiting for each one to finish executing,I've been stuck on this for a long time, i went through multi threading for c++ in dev-cpp and the Win API code is quite complicated. Can somebody provide the code to …

Member Avatar for Ancient Dragon
0
187
Member Avatar for fire_

Hello guys. How can i make my program start minimized to system tray? I'm using MFC. I managed to make it start hidden, but i can add sys tray icon... Any ideas? Thank you

Member Avatar for Ancient Dragon
0
83
Member Avatar for silversurfer515

Hey guys , I have been asked by my boss to write some c++ code to read from a web page, this is alien to me as I have an electronics background and know nothing about networking. I managed to find a c++ library called urlmon which has a method …

Member Avatar for silversurfer515
0
147
Member Avatar for sahil1991

hi friends, check this program beneath....... \\program to fin integere part and fractional part of given real number... #include<iostream.h> #include<conio.h> void intfrac(int,float&,float&); void main() { float number,intpart,fracpart; cout<<"enter any real number:"; cin>>number; intfrac(number,intpart,fracpart); cout<<"integer part is:"<<intpart; cout<<"\nfraction part is:"<<fracpart; getch(); } void intfrac(float n,float& intp,float& fracp) { fracp=n%1; intp=n-fracp; } …

Member Avatar for sahil1991
0
138
Member Avatar for Halomak

I am having problems while trying to communicate with the serial port. I have read many tutorials online and found all of them either to be not useful or just too complicated for the task which I must achieve. The task is simple. I want to: 1) Open a port …

Member Avatar for Halomak
0
118
Member Avatar for exekiel101

[B][/B] uhm sir... the program must be like this... ([I]<<snip>>[/I]..awwwhelp me plsss the rows and columns must input numbers manually ...and the result will be like multiplication table... the outcome must be like this: number of rows?: 5 number of columns: 6 input rows: 2 3 5 1 0 input …

Member Avatar for civirol02
0
282

The End.