49,757 Topics
| |
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 … | |
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. … | |
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 ; … | |
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. … | |
I need ideas for a C++ [COLOR="Red"]mini [/COLOR]project. It should be complex enough to involve 4 students. | |
[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(); … |
The End.