49,757 Topics

Member Avatar for
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
137
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
233
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
299
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
537
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
146
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
100
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
Member Avatar for asilter

when i, [code] g++ -c Serdar.cc [/code] compiler says: [code] Serdar.cc:3: error: semicolon missing after declaration of `Serdar' Serdar.cc:4: error: ISO C++ forbids defining types within return type Serdar.cc:4: error: two or more data types in declaration of `SetValue' Serdar.cc:4: error: prototype for `Serdar Serdar::SetValue(const int&)' does not match any …

Member Avatar for iamthwee
0
279
Member Avatar for Ricle

Is there any API provides easy threading and socket programming in C++? I am programming in VC++6 environment. Thanks.

Member Avatar for vijayan121
0
64
Member Avatar for hapiscrap

I ran the program in Xcode with Java Tools: [code=cpluslus] #include <iostream> using namespace std; main() { int employeeid; int hoursworked; float hourlyrate, grosspay, taxamount, netpay; float const TAXRATE = 0.10; cout << "ENTER THE EMPLOYEE ID: "; cin >> employeeid; cout << "ENTER THE HOURS WORKED: "; cin >> …

Member Avatar for vijayan121
0
144
Member Avatar for prs55

I am trying to calculate the date of easter in the years 1900-2099 ,inclusive.And a,b,c,d,e variables are defined as in program and the date of easter is March 22+d+e(which may be in april),except in the years 1954,1981,2049 and 2076 when easter is one week earlier than the formula given. From …

Member Avatar for prs55
0
153

The End.