- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 36
- Posts with Upvotes
- 33
- Upvoting Members
- 28
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 3
142 Posted Topics
Re: [QUOTE]How to write a C program to count the number of mouse clicks in our Pc.Can any one give me idea for that ? [/QUOTE] Your question is very vague. For example, what OS are you using? Do you want to count the mouse clicks in one particular application or … | |
Re: You'll first have to download [JSON.net](http://james.newtonking.com/json) Here's a simple example.... using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net; using Newtonsoft.Json; class Program { static void Main(string[] args) { using (WebClient webClient = new System.Net.WebClient()) { WebClient n = new WebClient(); var json = n.DownloadString("http://data.mtgox.com/api/2/BTCUSD/money/ticker_fast"); string valueOriginal = Convert.ToString(json); … ![]() | |
Re: Have you tried using the Microsoft IDL compiler (MIDL.EXE) from the command line? | |
Re: The L prefix denotes a wide character/string literal. That is, it is of type wchar_t instead of char. Also, to reiterate the L prefix is only used with literals. #include <iostream> #include <string> int main() { std::wstring comport; std::wcout << L"Enter your comport: "; std::wcin >> comport; std::wcout << L"Com … | |
Re: qDebug() << db.lastError(); What's the error message from the above statement? You may want to use the following to print the message... cout << db->lastError().text() << "\n"; | |
Re: > In the above code the problem is that the values are sent only when the program is closed, before that even though the connection is getting established, at the receiving end no values are read. I can't recreate your problem. I've used your posted code to connect to a … | |
Re: Have you tried using the following command? axWindowsMediaPlayer1.uiMode = "none"; | |
Re: Details of your error code... > wbemErrAccessDenied > Value is -2147217405 (0x80041003) | |
Re: Maybe this example will be of some help to you... #include <windows.h> #include <tchar.h> #include <stdio.h> #define _WIN32_DCOM #include <iostream> using namespace std; #include <comdef.h> #include <Wbemidl.h> # pragma comment(lib, "wbemuuid.lib") int _tmain(int argc, _TCHAR* argv[]) { CoInitialize(NULL); { VARIANTARG *pVals; SAFEARRAYBOUND rgsabound; rgsabound.lLbound = 0; rgsabound.cElements = 4; SAFEARRAY* … | |
Re: I believe your logic is flawed. For example, if I enter 1969 into your app, it will return MDCCCCLXIX. Unfortunately, that is not the correct Roman Numeral for 1969. The correct Roman Numeral is MCMLXIX. | |
Re: Here's an excerpt from Introducing Windows 7 for Developers.. > The Better Model: Enhancing the Touch Experience > > The Better model addresses the need to make your application touch aware and provide better touch and multitouch support to your application than the default legacy support that was explained in … | |
Re: > When I tested this program it worked right up until I selected another window, at which point it effectively 'paused' until I selected it again. Is there any way to make this not happen? Maybe the following starter code can be of some assistance to you.. #pragma comment(lib,"user32.lib") #pragma … | |
Re: [OpenFileDialog](http://msdn.microsoft.com/en-us/library/system.windows.forms.openfiledialog%28v=vs.110%29.aspx) | |
Re: It appears that you may be going out of bounds on your char arrays which may be resulting in a stack corruption. Try the following. Change these three variables... char day[2] = ""; char month[2] = ""; char year[5] = ""; to.... char day[3] = ""; char month[3] = ""; … | |
Re: > Note: I believe all of the symbols which I am referencing are a part of UTF-16 (none have Unicode values higher than FFFF), but I am not well educated on exactly how unicode works. > How do wchar_t and wfstream respond to normal ASCII input (given that unicode is … | |
Re: Celcius to Fahrenheit conversion formula can be found at [this](http://www.mathsisfun.com/temperature-conversion.html#explanation) link. | |
Re: Maybe a simple example will point you in the right direction... #include <iostream> #include <fstream> using namespace std; #define MP3FILE "01-Cheeseburger in Paradise.mp3" int main(void) { char title[31] = {0}; ofstream myOutputFile; streamoff pos; myOutputFile.open(MP3FILE, ios::out | ios::in | ios::binary); if(!myOutputFile.good()) { cout << "myOutputFile open failed"; system("PAUSE"); return 0; … | |
Re: I hope the following explanation is helpful. Unfortunately, I can't find any preview option, so I'm not sure how the post will appear I've iterated line by line thru the while loop in your posted coded as indicated below. Assume n (input) is 1234 Since reverse is initially zero reverse … | |
Re: Another option... #include <stdio.h> #include <string.h> char* reverse_string(char* str) { for(int beg = 0, end = strlen(str) - 1; beg < end; ++beg, --end) { str[beg] ^= str[end]; str[end] ^= str[beg]; str[beg] ^= str[end]; } return str; } int main(void) { char buffer[]="Hello World"; printf("%s\n", reverse_string(buffer)); return 0; } | |
Re: // Can also use COM2, COM3 or COM4 here hPort = ConfigureSerialPort("COM1"); if(hPort == NULL) { printf("Com port configuration failed\n"); return -1; } I'm assuming your problem is due to using a non existent COM port. In this case, COM1 does not exist. Thus, one possible solution would be to … | |
Re: The addtohead method isn't needed. Use the insertionsort method to add (insert) a char and sort the linked list. You'll have to address four different cases in a insertion sort linked list: Case 1. An inserted node is the first one to be added to an empty list. Case 2. … | |
Re: Unfortunately, you have a lot of potential issues with your clipboard data application. You may want to reference [this post](http://cboard.cprogramming.com/windows-programming/103813-how-track-every-copy-event.html#post760572) for a better understanding of the clipboard API. | |
Re: IMHO, password protection of a folder would normally be done on the kernel level. But check out [this security link](http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.aspx) which may provide something of use to you. | |
Re: [Here](http://www.zoneminder.com/forums/viewtopic.php?f=9&t=19215) is a link demonstrating how to connect to a mySql database on a Linux back end server from a Windows box. | |
Re: ProcessStartInfo probably can't find the executable. I would suggest that you put the full path name to the executable in your exePath variable. const string exePath = "test-min.exe"; | |
Re: > I have read on LockBits method but I dont understand how to use it properly on the picturebox as I am new to C++. Can anyone give me an example on how to go about doing this An example of using LockBits..... // test.cpp // Compile cl /CLR test.cpp … | |
Re: > So can anyone tell me how to find the permission of the file?? #include <unistd.h> #include <stdio.h> #include <sys/stat.h> #include <sys/types.h> int main(int argc, char **argv) { struct stat fileStat; if(stat(argv[1],&fileStat) < 0) return 1; printf("File Permissions: \n"); printf( (S_ISDIR(fileStat.st_mode)) ? "d" : "-"); printf( (fileStat.st_mode & S_IRUSR) ? … | |
Re: > c++ that estimates easter holiday annually? [Here](http://www.hourworld.com/easter.htm) is a link that provides the Easter Sunday algorithm. | |
Re: > is it not the same thing as ioctl?? Well, ioctl is essentially the means for userland to communicate with the kernel. For example Windows uses ioctl-like commands as follows to open the CD tray: #include <windows.h> #include <stdio.h> int main(void) { DWORD bytes = 0; HANDLE HCDrom = CreateFile("\\\\.\\D:",GENERIC_READ,FILE_SHARE_WRITE,0,OPEN_EXISTING,0,0); … | |
Re: Have you considered [memory mapped files](http://blogs.msdn.com/b/salvapatuel/archive/2009/06/08/working-with-memory-mapped-files-in-net-4.aspx)? | |
Re: What's wrong with the following if statements? if(enorde=1) { do { if(enorde=2) { do { Your code appears to be converting the letters to upper case and then doing the shift. Then in your decode function, you're again checking for upper case and if upper case you're AGAIN SUBTRACTING 32. … | |
Re: Generate a hash (checksum) value using such algorithms as MD5, SHA1 etc. on the original file. To later verify whether or not the file has been altered, you must run the file thru the algorithm again. You will get a different hash value if one single byte of the file … | |
Re: Do the following to transpose... 1. Change outer loop to loop on columns 2. Change inner loop to loop on rows 3. Swap your row and column variables for your 2D array when printing it from the inside loop | |
Re: One possible solution.... string[] sortit = File.ReadAllLines("shenime.txt"); Array.Sort(sortit); foreach (string str in sortit) Console.WriteLine(str); | |
Re: The price variable should be initialized to some value in your calculateWage function. Otherwise, your net salary calculations are meaningless. | |
Re: Change this on line 47 displayctbal(record_t record); to this displayctbal(accounts[i]); | |
Re: You need three loops as indicated in the pseudo code listed below.. Loop from I = 0 to I < MAX Loop from J = 0 to J < MAX Loop from K = 0 to K < MAX Output[K][I] += FirstArray[K][J] * SecondArray[J][I] | |
Re: [Another Daniweb thread on matrix multiplication.](http://www.daniweb.com/software-development/cpp/threads/438044/multi-dimensional-array) | |
Re: As a starting point, use the RawPrinterHelper class from [this](http://support.microsoft.com/kb/322091) Microsoft Knowledge base article. | |
Re: Open the Visual Studio Command Prompt as Administrator and resolve the gnerated syntax errors. The key is to open the VS console as Administrator. | |
Re: > > looks like i flipped bmp image with this code, bot it changed color )) > also still meta data unknown > http://www.cs.pitt.edu/~kirk/cs1501/Ramirez/Spring2008/assigs/compression/data/tux-large.bmp > Unfortunately, modifying or "flipping" a bitmap image is not that simple. You just cannot transpose every single byte in the binary BMP file and expect … | |
![]() | Re: [The solution.](http://cboard.cprogramming.com/c-programming/151719-fread-not-working.html) |
Re: [Keylogger using SetWindowsHookEx tutorial.](http://www.rohitab.com/discuss/topic/19360-keylogger-tutorial/) | |
Re: IMHO, trying to build libpng with the MingW compiler is little more than a lesson in futility. I found a lot of "solutions" on the internet. But I could never get any solution to successfully build libpng. I did notice that libpng has a MS Visual Studio project in the … | |
Re: else { tptr = head; while (tptr->next) { tptr = tptr->next; tptr->next = newNode; } } Assuming that you have already entered the first record, the Wallace Henry record and you are about to enter the second record (Washington, George record). Prior to entering the second record, the tptr->next would … | |
Re: > Would anyone know how to 'BUILD' a 'Debug' and 'Release' version of zlib using a MingW compiler I believe the Release version is the default build version. Have you tried adding -DDEBUG to the CFLAGS variable in the makefile to build the debug version? | |
Re: > I must be missing something...? Yep, you're definitely missing something such as the code to your program. Post the code to your program that doesn't run. | |
Re: How about using a pointer for an array? For example an integer array would be int *data; You would use [realloc](http://www.cplusplus.com/reference/clibrary/cstdlib/realloc/) to create additional storage space to add the new unique number to the array after you have searched thru the array to determine that the new number is in … | |
Re: [Win32 Tutorials](http://www.functionx.com/win32/index.htm) is a good starting point. Check out the GDI info. | |
Re: > The problem is that when reading from a text file the program will only read some of the file not all of it Your while( file.goof()) loop is probably choking on the the New Hampshire record. Notice the white space delimiter between New and Hampshire. Thus, you're inserting New … |
The End.