49,757 Topics

Member Avatar for
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
239
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
101
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
446
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
Member Avatar for gregarion

Hey guys , as from what i read up , the function srand() and rand() are able to give u random numbers if they are being run one time only. What i am trying to do is to produce a set of random and unique numbers from 1 - 10. …

Member Avatar for ixmike88
0
114
Member Avatar for bufospro

Hi all, I am new in c++ programming and I am trying to make some examples But unfortunately I have some problems My code is : [CODE] #include <iostream> #include <string> using namespace std; int main() { string firstname, lastname, fullname; cout << "First name: "; cin >> firstname ; …

Member Avatar for stevanity
0
99
Member Avatar for sg79

Hello, can someone help me write this C++ program: An array can be used to store large integers one digit at a time. For example, the integer 1234 could be stored in the array a by setting a[0] to 11, a[1] to 2, a[2] to 3, and a[3] to 4. …

Member Avatar for Intrade
0
273
Member Avatar for rogue005

I need ideas for a C++ [COLOR="Red"]mini [/COLOR]project. It should be complex enough to involve 4 students.

Member Avatar for alibabashaun
-1
679
Member Avatar for sabareesh

[CODE] // for get info from document class strText = pDoc->GetText(); lfFont = pDoc->GetFontInfo(); clrNew = pDoc->GetColorInfo(); // get size GetClientRect(&rcPoint); //// create the font VERIFY(fntNew.CreateFontIndirect(&lfFont)); // create font CFont* fntOld = pDC->SelectObject(&fntNew); // set text color pDC->SetTextColor(clrNew); // for display text pDC->DrawText(strText, strText.GetLength(), &rcPoint,0 ); // delete font fntOld->DeleteObject(); …

Member Avatar for sabareesh
0
84

The End.