49,761 Topics

Member Avatar for
Member Avatar for sasikala123

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 …

Member Avatar for ~s.o.s~
0
121
Member Avatar for Pretorak

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) { …

Member Avatar for robgxxx
0
2K
Member Avatar for toolmanx

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?

Member Avatar for vijayan121
0
123
Member Avatar for veronicak5678

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 …

Member Avatar for Salem
0
81
Member Avatar for nitin_rajurkar

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) …

Member Avatar for nitin_rajurkar
0
113
Member Avatar for jsap

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]

Member Avatar for jsap
0
139
Member Avatar for zandiago

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 …

Member Avatar for zandiago
0
94
Member Avatar for radskate360

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 …

Member Avatar for zandiago
0
268
Member Avatar for toonces

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. …

Member Avatar for toonces
0
236
Member Avatar for Ricle

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) …

0
44
Member Avatar for hoceandress

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 …

Member Avatar for GreenDay2001
0
90
Member Avatar for eranga262154

Can someone explain, how can read a binary file. I'm really nervous with this.

Member Avatar for eranga262154
0
318
Member Avatar for Duki

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 …

Member Avatar for Dave Sinkula
0
300
Member Avatar for hassan_kh

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 …

Member Avatar for mark busenitz
0
540
Member Avatar for hassan_kh

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, …

Member Avatar for Ancient Dragon
0
104
Member Avatar for hassan_kh

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 ); …

Member Avatar for Ancient Dragon
0
243
Member Avatar for hassan_kh

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 …

Member Avatar for hassan_kh
0
140
Member Avatar for hassan_kh

[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 = …

Member Avatar for Ancient Dragon
0
147
Member Avatar for hassan_kh

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 ); …

Member Avatar for Hamrick
0
187
Member Avatar for m_meena

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 …

Member Avatar for vijayan121
0
85
Member Avatar for iamthwee

[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 ); } …

Member Avatar for Hamrick
0
383
Member Avatar for ndeniche

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] …

Member Avatar for Hamrick
0
71
Member Avatar for m_meena

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 …

Member Avatar for Hamrick
0
153
Member Avatar for qaiser

plz write a code in c++ to print the table of any number using"for"loop.

Member Avatar for Ancient Dragon
-1
71
Member Avatar for nive

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 …

Member Avatar for nive
0
115
Member Avatar for kennywu54

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?

Member Avatar for Dave Sinkula
0
97
Member Avatar for chunkmartinez

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 …

Member Avatar for chunkmartinez
0
83
Member Avatar for amishosh

Hi! I'm looking for ideas for programs that will give me a good practice for using threads. Does anyone have any ideas?

Member Avatar for Ancient Dragon
0
101
Member Avatar for janna303

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 …

Member Avatar for Ancient Dragon
0
135
Member Avatar for tendyhk

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 …

Member Avatar for ndeniche
-1
141

The End.