49,761 Topics
| |
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 … | |
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 … | |
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], … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … | |
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) … | |
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", … | |
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. | |
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 | |
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.. | |
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 … | |
[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; … | |
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 … | |
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 … | |
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 … | |
[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 ? | |
hi dani please i have an assignment help me ! what i want see in above title thank you! dani | |
[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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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; } … | |
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 … | |
[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 … |
The End.