49,761 Topics
| |
I am a beginner in programming, I wanted to well verse in basic languages like c & C++. While talking about the theory I can easily understand the concepts, but If I need to write a program with simple concept I am struggling to even think of it. I wanted … | |
Hello everyone, I don't often use forums for getting answers, but I simply cannot seem to find how to fire a MessageBox under Borland Builder...I could use MessageDlg which works, but I only want an OK button, so I would rather go with MessageBox...code sample: [CODE]void __fastcall TForm1::cmdPlayClick(TObject *Sender) { … | |
I have been using the Borland BCC32 compiler and love the CPP32 line numbering tool. Now I want to switch to the cl.exe compiler. Is there a tool like CPP32 in the Microsoft system? | |
I am tyring to write a simple program to displa yloan information. Here are my instructions: The monthly payment on a loan may be calculated by the following formula monthly payment=(monthlyrate*(1-monthlyrate)^time/(1+monthlyrate)^time-1)*loanamount Use pow function in your formula To raise a number to the power of another number you will have … | |
Hi Everybody, I need your help to solve a problem. We are developing CAD software. The software was working fine. It is developed using Visual C++.Net on Visual Studio 2003. However, we had to make it Unicode enabled. The minute we defined "UNICODE" and "_UNICODE" in Project Properties (C/C++ -->Preprocessor) … | |
I have a function that takes a void** and I want to pass an integer in to the function but can not seem to figure out the syntax here is the function prototype [code]bool pop(Node **stack, void **data)[/code] | |
My question is rather brief (it's similar to what is at [url]http://www.daniweb.com/forums/thread79268.html)[/url]. I've writen the program....but...i was just wondering (apart from the program itself) if there would be anyway to verify if what the program did is correct mathematically? I'll post my code if required. Thx and have a good … | |
Hi all, I have a assignment that says, write a program that will add up all of the odd numbers from 1 through 3579 and alll of the even numbers from 522 to 2222. Use While loops. Output should look like this The sum of the odd numbers from 1 … | |
I am doing cross compiling between C++ and C compiler for header files and desperately need help on figuring out namespace issue error generated by C++ compiler. Here are two header files:abc1.h, abc2.h and a C/C++ file containing the main(). When I compile this code on C, it works fine. … | |
I want to map a message onto a handling function code as following: #define WM_USER_THREAD_FINISHED (WM_USER+1) #define WM_USER_THREAD_UPDATE_PROGRESS (WM_USER+2) afx_msg LRESULT OnThreadFinished(WPARAM wParam,LPARAM lParam); afx_msg LRESULT OnThreadUpdateProgress(WPARAM wParam,LPARAM lParam); ON_MESSAGE(WM_USER_THREAD_FINISHED, OnThreadFinished) ON_MESSAGE(WM_USER_THREAD_UPDATE_PROGRESS, OnThreadUpdateProgress) When I compile, errors always occur: ...\listener.cpp(484) : error C2447: missing function header (old-style formal list?) ...\listener.cpp(484) … | |
my problem is, when i try to withdraw bigger than balance...it will display the remaining balance..it display negative..which is wrong..instead of display the msg "you have not enough money". what's wrong with my code? [code=cpluslus] this is my code::::: if (withdraw == 1) { bal=bal-100; gotoxy(25,17); cout<<"Your balance now is … | |
Can someone explain, how can read a binary file. I'm really nervous with this. | |
My prof is touching on information hiding, and good programming techniques. He said it's a good idea to keep as much of the user interface (i.e., couts) in main, and then modify object variables through the use of functions. Here's what I want to do: I'm starting on a program … | |
Given that input_time actually represents an integer value in seconds since the epoch - and has the value 0 at precisely "Thu Jan 1 00:00:00 1970", write a better implementation of this function. 1: unsigned long normalise(unsigned long input_time) 2: { 3: 4: bool finished; 5: 6: // This produces … | |
Here are two sample tables of information which are used by a high school to keep track of the grades for its students. One table contains the names and addresses of the students, together with a student ID number. The second table contains the class name and class ID number, … | |
What would happen when the code is run? a) As originally written? b) With the first bug fixed? 1: unsigned long normalise(unsigned long input_time) 2: { 3: 4: bool finished; 5: 6: // This produces a formatted time string like: 7: // Thu_Nov_24_18:22:48_1986 8: string str_time = format_time( input_time ); … | |
Please write down any assumptions or deductions you make, and show all your calculations / workings, completing the task within 10 minutes (guide time). What initial values of a and c are required such that the final values of a and b are: a = 32, b = 4 int … | |
[code=cplusplus] unsigned long normalise(unsigned long input_time) { bool finished; // This produces a formatted time string like: // Thu_Nov_24_18:22:48_1986 string str_time = format_time( input_time ); while( str_time.substr(1,3) != "Sun") { input_time -= 24*60*60; str_time = format_time( input_time ); } while( str_time.substr(11,2) != "00" ) { input_time -= 60*60; str_time = … | |
1: unsigned long normalise(unsigned long input_time) 2: { 3: 4: bool finished; 5: 6: // This produces a formatted time string like: 7: // Thu_Nov_24_18:22:48_1986 8: string str_time = format_time( input_time ); 9: 10: while( str_time.substr(1,3) != "Sun") 11: { 12: input_time -= 24*60*60; 13: str_time = format_time( input_time ); … | |
Hi, I have two exes, one is in C# and other in C++. The C++ exe is a windows service. i want to notify my C# executable with events occuring in the windows service. How can i call a c# code frm C++. The application is a simple form based … | |
| [QUOTE=~s.o.s~;277435]If you use C++ strings your life would be much simpler coz then you can do something like: [code=cpp] #include <string> const std::string whiteSpaces( " \f\n\r\t\v" ); void trimRight( std::string& str, const std::string& trimChars = whiteSpaces ) { std::string::size_type pos = str.find_last_not_of( trimChars ); str.erase( pos + 1 ); } … |
ok guys... so here's a nice one... suppose i have a matematical expression with variables less than 10 and greater than 0... and i divide the mathematical expression in leaves and nodes, being the operands the leaves and the operators the nodes... something like this:[code] (w+x)*(y-z) [B]*[/B] / \ [B]+[/B] … | |
Hi, I have two exes, one is in C# and other in C++. The C++ exe is a windows service. i want to notify my C# executable with events occuring in the windows service. How can i call a c# code frm C++. The application is a simple form based … | |
plz write a code in c++ to print the table of any number using"for"loop. | |
Friends, Can any one help me in writing code to (a) Generate first 10 prime numbers, (b) Find highest common factor(hcf) of 3 numbers, and (c) Program to print the first N number in the fibonacii series. I am a beginner. I need help and guidance to become a good … | |
I am reading from a text file some names and assigning them to arrays. Ex. Mike Smith John Doe When reading and assigning to firstName[i], 'Mike' takes up the first four indicies in the firstName array, but I only want 'Mike' to be in the first index (firstName[0]). Any suggestions? | |
im wanting to make an easy program that can read every filename in a folder, then do a file output to an html file to create a list of links to all of the files (every file in the folder are saved archived MSIE pages too), so that i can … | |
Hi! I'm looking for ideas for programs that will give me a good practice for using threads. Does anyone have any ideas? | |
I am fairly new to object oriented programming, but have two simple questions on a piece of code. Note that this code has been simplified greatly without changing the net result: [code] #include <stdio.h> #include <iostream.h> class first_one { int x; int y; public: first_one() { x = 1; y … | |
got my first HW on the first day of class, have no idea of what to do, please help me!!!! The HW question is this write a program that will act as an interactive calculator capable of handling very large (larger than the largest long integer) nonnegative integers. this calculator … |
The End.