About Experts Sitemap - Group 8 - Page 33 2016-09-20

C++: What is difference,, object oriented programming, bscs
object oriented programming, bscs, functional programming: Hello, You can write a database in C++. I m not sure what you mean by C++ database. C++ is designed more towards object oriented programming, while C is geared to structural/functional programming. I prefer C++ because I think it enables better code...

C++: How to differentiate integer and alphabets, column headings, hyg
column headings, hyg, previous question: In fact you have all the information you require in my answer to your previous question. I assume you have some experience in writing C as you claimed in your original question. The way to proceed is as follows: 1/ Note that the lines at the start of...

C++: How to differentiate integers and alphabets when reading .txt file using C, learnt c, specification string
learnt c, specification string, jgjgj: First because you are asking a C++ expert I will make it clear that I have not written pure C code for many years. Hence I may introduce C++ only idioms, due to forgetting all the things you cannot do in C but can in C++. If this is not acceptable then please...

C++: How to differentiate integers and alphabets, delimeter, hyg
delimeter, hyg, busy at work: Hello Liwei, thank you for the question. Sorry I couldn t get to this sooner, I have been extremely busy at work. Here is what I recommend. Use strtok() to parse your file with a space as a delimeter. Every token you pop out, convert it to a number...

C++: what is the diffrence b/w a constructor and a Member function, object creation, member function
object creation, member function, constructor: Constructor is automatically called at the creation of the object. If no constructor is provided then a defalut constructor is called. Member function is not called at the object creation. It is called once the object is created. Hope I answered calirified...

C++: One dimensional arrays, one dimensional arrays, const int
one dimensional arrays, const int, reading values: You should check directly after you have read the value in from the user. You need to test the state of the stream (cin) to see if it is bad (fatal error) or fail (formatting error). The latter is in fact recoverable by clearing the fail bit and ignoring all...

C++: How to display Arabic characters console application using MSVC++.net, david spector, microsoft visual c
david spector, microsoft visual c, arabic characters: Ahmad Al-Asmar , Thank you for your question. Your development and host systems must be set up to handle either multi-byte (MBCS) or 16-bit (Unicode) character I/O. In addition, you must have the correct Locale and Page set up. I am not sure if anything...

C++: How does it display ???, setw, char c
setw, char c, using namespace std: First of all I would appreciate it if you could be bothered to post code that is laid out in a reasonable way. It took me quite a lot of reformatting to see what your code actually does. Mostly you need to ensure that you have line breaks in a few places and...

C++: doing division, denominator numerator, numerator denominator
denominator numerator, numerator denominator, input techniques: This is not so much a C++ question as far as I can tell, but a general point about the different numeric types used by computers. From what you say you are doing something like: int numerator(0); int denominator(1); std::cout...

C++: dll exported functions, c dlls, bstr t
c dlls, bstr t, expert category: I presume you can in fact call the C/C++ functions from VB but do not get the results you were hoping for. Now I should point out that I am _not_ a VB or VB.NET expert - that is why I am in the C++ expert category grin . Which brings me to my next point....

C++: dll hooking, cbtproc hook procedure, keyboard event
cbtproc hook procedure, keyboard event, message queue: Yes. All the exported symbols that are used by the application that uses the original dll _must_ be present in the replacement – it has to look just like the original. However, if you read the answer, you will notice that most of the replacement functions...

C++: draw a graph, thx alot, device context
thx alot, device context, win 32: Hello yosr eman, thank you for the question. If they told you that you cannot use MFC, then I see no reason why you can t make a standard windows application. Under no circumstances should anything be drawn in a console application. Console apps are for...

C++: How to draw a graphics like circle, area of a square, device context
area of a square, device context, lineto: Hello zaheer, thank you for the question. This is an easy problem. This is also assuming it is a Windows application. You can get a handle to a device context by calling GetDC(), then you can use that device context to draw. Example: HDC hdc = GetDC(hWnd);...

C++: to draw lines, graphics controller, graphics program
graphics controller, graphics program, bgi: Hello suresh, thanks for the question. I would highly suggest going to the website of whomever made your video card and downloading all the drivers from there. Most companies have a link to download their drives on their website, and if not you should contact...

C++: dynamic binding of overloaded operator, void operator, base operator
void operator, base operator, dynamic binding: There is no polymorhic behaviour. Because you re still making the same mistake. operator + (base & i) operator + (derived & i) The parameter types for overridden member functions must be exactly the same. Your code does not override the virtual function...

C++: Employee Payroll program, visual c 6, payroll program
visual c 6, payroll program, employee payroll: Shall, Passing info from one function to another function can be tricky. You could try using global variables, although this method is usually frowned upon. It really depends on where the functions are being called. If you have function A and function ...

C++: Enterpreneur vs Developer, salary limit, endless challenge
salary limit, endless challenge, programming environments: The choice between being a developer and being an entrepreneur really boils down to risk. Being a developer has an average to good compensation for low to moderate risk. Being an entrepreneur has potentially insane compensation for equally insane risk. :-)...

C++: Enterpreneur vs Developer, salary limit, endless challenge
salary limit, endless challenge, programming environments: diamind , Thank you for your question. The world economy is currently depressed. This depression has hit the manufacturing and technology sectors particularly hard. There are few software jobs available in most locales. Jobs that pay $100K or more per year...

C++: Enterpreneur vs Developer, salary limit, endless challenge
salary limit, endless challenge, programming environments: Hi Diamind. After you have read my opinion, you might have an impression that I am dissuading you fron your plans. It is not so.I am presenting only the picture as I can see it. Only you can decide what is best for you. Software business might seem lucrative,...

C++: Error C2228 and what is std::string::npos?, visual c 6, microsoft visual c
visual c 6, microsoft visual c, mcardell: First I would like to point out that you should not freak out when you get errors from the compiler – it is a complete stickler for correctness as it sees it (even if the way it sees it is different from the C++ standard). You have to please it to get it to...

C++: Error Mesage on XP, david spector, c runtime library
david spector, c runtime library, visual c runtime library: Mike , Thank you for your question. I regret that I do not have the knowledge to answer this question. I suggest that you post this question in the Windows category at www.experts-exchange.com, which is more advanced than allexperts.com. David Spector...

C++: Error: Vector Subscript out of range, run time error, runtime error
run time error, runtime error, vector: Hello Rishi, thank you for the question. Unfortunately, there is no way to deduce this runtime error with actually seeing your code. Can you please post it? This is most likely caused by accessing out of bounds of the vector. Here is an example:...

C++: Excel and Turbo C++ 3.0, david spector, borland 5
david spector, borland 5, turbo c: Prasanna , Thank you for your question. Any compiler should allow you to write a program that creates an Excel COM object and use it to manipulate a spreadsheet. For the details of the Excel COM interfaces, consult the documentation that came with your...

C++: Getting Exception when reading from files, visual studio 6, ios
visual studio 6, ios, gander: Hello Rivas Hameed, thank you for the question. Giving the code the once over, I m fairly certain that it is crashing because you are casting a CString to a char* for no discenerable reason. Sure, the function call requires a char* parameter, but why don...

C++: Exploding a string into an array, c standard library, vector array
c standard library, vector array, vector type: There are several ways to do this. The most obvious is to leverage the facilities of the C++ standard library. One problem with your example is that in C and C++ you cannot return a built in array from a function. Instead you would have to return a pointer...

C++: Exporting GDI drawings to WMF/EMF file or clipboard., metafile records, enhanced metafile
metafile records, enhanced metafile, arrow lines: zaheer, 1. A DC represents a drawn image. When you draw on a DC, the GDI records are saved while the image is drawn. So you should not need two DCs to draw to a window and then save the image in a .wmf file. 2. If you are displaying your entire large...

C++: Extracting words from a text file./C++, english sentences, character array
english sentences, character array, punctuation marks: Dear ritish! Ya the problem is simple , but there may be lot of Meaning less words will be produced in the final list. . Create a list that can accommodate a string with 4chars . Traverse the input file by single character , if punctuation_marks...

C++: easy one, random memory, memory address
random memory, memory address, endl: Garritt, The code, as you have it, won t work. You can t use a variable before you initialize it. I.E., you can t say x=21; before you write int x; . You could write int x = 21; , and that would work fine. In theory, what you have written would set the...

C++: How to edit a certain position in a text file using C++, printer number, seekg
printer number, seekg, delim: One method is read a word using get() function setting for delim from the file. Compare it with word. If it matches with the word then move the file pointer to the location of the word and write the word to be replaced. Please, let me know whether it answers...

C++: enquiry, dos command line, microsoft visual c
dos command line, microsoft visual c, windowed application: Hello Talal, thank you for the question. A win32 application is your basic application for a normal, everyday average Windows program. The 32 specifies the bit level. 32 is the standard bit level on today s machines, though I m sure some of the more advanced...

C++: how to enter only numbers or alphabets?, numeric entity, input example
numeric entity, input example, beging: Hi, Saifuddin Thankyou for your question. Please accept my apologies for the delay in answring, actually i am kind a busy in my personal project. I ll get back to you in some hours regarding this question. For time beging, if you wana know whether...

C++: equivalent to "realloc" in C++, array array, array size
array array, array size, raw memory: No, you have three choices if you want to dynamically resize your arrays: 1) Use malloc and free to manage the memory so that realloc becomes available. This isn t a good option because malloc and free, as well as realloc, don t handle class types very...

C++: error C2071 issue, visual c 6, illegal storage
visual c 6, illegal storage, mm index: FOLLOWUP --------- Correction: #line is standard in C and C++ of course! And the preprocessor should not become confused as it only recognises preprocessor tokens at the start of lines - ignoring whitespace. ORIGINAL -------- Hmm, interesting....

C++: error C2678(c++), hand operand, mcardell
hand operand, mcardell, binary operator: First let me clarify errors. C2678 is _not_ a C++ error - the C++ standard stipulates where an implementation should determine that code is in error, but does not say what form of reporting errors takes. C2678 is an error specific to your compiler - MSVC++...

C++: an error, fname lname, c const
fname lname, c const, ditches: BM, 1) The problem with your clerk struct is relatively easy. You first declare struct clerk{ , indicating to the compiler that everything following the { will be in the struct. However, on the next line, you re telling the compiler struct finance fin;...

C++: eval function from javascript in C++?, c source code, expression parser
c source code, expression parser, script variables: In this respect C++ is fundamentally different from Javascript, Java, or the .NET languages. It is a statically typed and compiled system - that means that all types, variables and the like are known to the compiler during compilation, and resolved during...

C++: execute constructor
hi sachin Constructors work is to initialise a variable ... and you can t initialise a variable twice its of no use simply so its called only once you can t call it twice. I have a program written long back which invokes 2 constructor at the same time...

C++: explain, integers, data types
integers, data types, pointers: It is very similar to array of normal data types. You remember that for integers you define arrays like: int myArray[10]; now if you have defined an object type like: class myObject{ .... }; you can define an array of that object as: myObject...

C++: explain, integer array, generic code
integer array, generic code, memory: Hi there: I hope u ll be fine. I m not sure what to explain as this is pretty much straightforward. An array of objects is just like an ordinary integer array except that instead of data it contains the references to the objects i.e. it contains the...

C++: explain, const int size, variable type
const int size, variable type, ary: Hello Daniel, thank you for the question. An array is a way of ordering a group of variables of the same type. You used the term objects in your question, but those objects could be any variable type at all. You can even have an array of arrays. When...

C++: exponents, c standard library, truth table
c standard library, truth table, least significant bit: C and C++ have no operator for computing x to the power y. It _does_ have operators to perform various logical operations on the bits of values - ^ is the bitwise exclusive or (or XOR) operator which has the following truth table: A B A XOR B 0...

C++: How to export GDI+ bmp Image as EPS File Format, c programming language, david spector
c programming language, david spector, bmp image: pubudu , Thank you for your question. This does not appear to be a question about the C++ programming language. Please feel free to submit questions specifically about the C++ programming language to me at any time. I suggest that you post this question...

C++: expression tree, expression trees, expression tree
expression trees, expression tree, root node: siyavash khojasteh, You have given examples of two expression trees, however, they are not expression trees. Recall that you defined an expression tree recursively as an operator with two operands, each of which were constants, variables, or expression trees....

C++: Factors, david spector, homework questions
david spector, homework questions, perfect number: pl , Thank you for your question. Is this homework? It is against my policy to do homework questions. I can help you with work that you have already done, but I cannot give you full answers. Please attempt to do part of the work, and then ask a specific...

C++: Factors, perfect number, integer argument
perfect number, integer argument, perfect numbers: Dear Pl, Thankyou for your question. Well its quiet an interesting problem, well let me tell your first there are only 4 perfect numbers from 1 to 1000, may be ahead of it also. Your problem says to find the perfect number. You should attack this problem...

C++: File Handling in C++, ms vc, logic problem
ms vc, logic problem, explicit return: First, why are you using pre-standard and non-standard headers? The standard C++ header is fstream _not_ fstream.h and conio.h is Microsoft specific if I remember correctly. Also I see no need for including conio.h anyway, as far as I can tell you...

C++: File Names Command Line Arguments, david spector, command line argument
david spector, command line argument, command line arguments: Rakesh , Thank you for your question. 1. Open the file for reading, using CreateFile with the GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, and FILE_ATTRIBUTE_NORMAL flags. 2. Close the file. 3. If the result of the Open was FALSE, the file or folder...

C++: File I/O, random number generator, random number function
random number generator, random number function, random pairs: First I would suggest you use srand to seed the random number generator used by rand to produce different sequences of random numbers. A good general purpose way to produce the value taken by srand is to pass it the returned value from a function like time...

C++: File operation, istream, template parameter
istream, template parameter, template type: I suggest you go back and read the small print for the std:istream::getline functions, here are the signatures of these functions: istream& getline (char* s, streamsize n ); istream& getline (char* s, streamsize n, char delim ); (namespace and...

C++: File processing, database schema, getline
database schema, getline, falg: Sorry but you have almost all of the code I used. The only parts missing are: - the header includes (primarily iostream in my case, iostream.h in yours, also see comments below). - the using namespace std directive which as you are using an ancient...

C++: Find the greatest sum with moving cursor, empty location, grid location
empty location, grid location, programming question: I think the most difficult part of this program, is the way you should find the possible paths. If you can do that, then you should select the best path, which is the path that visits all. Sometimes, you might not be able to visit all numbers (depening on...

C++: Finding the primes, inner loop, endl
inner loop, endl, library code: Your program has not locked up. It is running. Continuously. In short: num4 is dependent only on num2 and num3 values and these values are invariant during execution of the inner do..while loop. What do I mean by that? Well, you terminate the...

C++: Flicker effect due to z order using MFC, flicker effect, david spector
flicker effect, david spector, mdi application: Calvin , Thank you for your question. Use the OnWindowPosChanging handler (WM_WINDOWPOSCHANGING) instead of the OnWindowPosChanged handler (WM_WINDOWPOSCHANGED). If this does not work, intercept the message earlier, in CWinApp::PreTranslateMessage. If this...

C++: Flicker in an MFC-based program, memory dc, monochrome images
memory dc, monochrome images, screen memory: Hello, Unless this is a huge project, I would highly suggest not getting involved with DirectX unless you know it already. Its an extremely confusing API. If the images are flickering, I was wondering if a hack like the following might fix it, assuming...

C++: Floating no comparison, fruit types, c implementation
fruit types, c implementation, relative precision: The problem is that you are not comparing like with like. You are comparing a lemon with a grapefruit (err, sorry that was the best I could come up with for a small and large version of similar fruit types!). Hence it depends on the values in question and...

C++: Follow Up, file structure, turbo c
file structure, turbo c, mail: Hi Rishi Your program will give the desired output if you include the header file #include stdio.h where the FILE structure has been defined in Turbo C/C++ But still to confirm I request you to join http://www.scodz.com/NewUser.php and make a community...

C++: Free C++ compiler, free c compiler, free c compilers
free c compiler, free c compilers, boreland: Dan, Sorry it has taken me so long to reply, the AllExperts website has been down for a few days. As for your question, you re already using the compiler that I would recommend for home use. A lot of people have said that they re using Borland s free C++...

C++: Free open source libraries, open source libraries, premnath
open source libraries, premnath, free open source: Dear Ashraf ! i don t know what sort of libraries you lookin for ! Basic or advanced , any way im sure its hard to get source for STANDARD LIBRARIES even if you get source it will b hard to follow or to understand , a better way is try to understand...

C++: Fstream->Flush(), character buffer, code string
character buffer, code string, file stream: Hello Jed, thank you for the question. I am assuming that the the file stream was becoming corrupted and flush somehow forced the correct values out of it and into the file. The problem is that you are casting a short int to a char*. The correct way...

C++: Function overriding, const void, class implementation
const void, class implementation, virtual base: First I should point out that the example code you show is not C++ as I know it. The keyword class, like all C and C++ keyword is case sensitive and is _not_ capitalised. Class definitions are terminated by a semicolon: class X { // ... }; These...

C++: Function not working., maze game, seekg
maze game, seekg, weird characters: I dont understand why you re doing in.seekg(0)? Probably that is the problem. If not, please get back to me with more details as to what is the format of the input file and what is the program trying to do. As it is, I dont have much idea and my answer is...

C++: Functions of the basic structure of a program, history of c, global namespace
history of c, global namespace, c libraries: 1/ The ISO C++ standard states that main may have one of two forms: int main() { /* ... */ } Or int main( int argc, char * argv[] ) { /* ... */ } The void main() form is a non-standard form specific to older...

C++: Functrions., c function overloading, inheritance
c function overloading, inheritance, parameters: Function overloading is giving the function same name but different types of parameters. Function call is made based on the type of parameter. Function overriding is used in inheritance by virtual keyword . Where same function definition of the base class...

C++: array
C++: array

C++: array data display, ultra fractal, global section
C++: array data display, ultra fractal, global section, plug ins

C++: Bank Accounts Program, amnt, endl
C++: Bank Accounts Program, amnt, endl, ofstream

C++: Bit Operators, true x, digit
C++: Bit Operators, true x, digit, mask

C++: Bse conversion, c num, num num
C++: Bse conversion, c num, num num, decimal number

C++: the best programming language, objective caml, modern languages
C++: the best programming language, objective caml, modern languages, programming language

C++: C++, sandra, functionality
C++: C++, sandra, functionality

C++: C code to know how many bits processor we are using
C++: C code to know how many bits processor we are using

C++: C++ code, equality, assignment operator
C++: C++ code, equality, assignment operator

C++: C++ delay a loop or funtion for paticular time delay, real time os, marvelous things
C++: C++ delay a loop or funtion for paticular time delay, real time os, marvelous things, waitformultipleobjects

C++: C++ Number Guess Program !, c case, srand
C++: C++ Number Guess Program !, c case, srand, char c

C++: C++ - Virtual destructors, object pointer, destructor
C++: C++ - Virtual destructors, object pointer, destructor, memory

C++: C++ vs Delphi, visual c compiler, object pascal
C++: C++ vs Delphi, visual c compiler, object pascal, free pascal

C++: C++, syntax errors, lowercase
C++: C++, syntax errors, lowercase

C++: Calculator (recursion version), expr, split function
C++: Calculator (recursion version), expr, split function, cores

C++: How to Compile, cccd, gilberts
C++: How to Compile, cccd, gilberts, occ

C++: Converting int to char*, itoa function, number string
C++: Converting int to char*, itoa function, number string, turbo c

C++: Converting Number into Words, clrscr, getch
C++: Converting Number into Words, clrscr, getch, lakh

C++: Count the number of occurrences of a word in string, loop ends, infile
C++: Count the number of occurrences of a word in string, loop ends, infile, zanga

C++: c, basic theory, postfix
C++: c, basic theory, postfix, increments

C++: c++, k 64, getch
C++: c++, k 64, getch, toupper

C++: c++/cookies & cgi, pl
C++: c++/cookies & cgi, pl

C++: c programming, homework problem, executable statement
C++: c programming, homework problem, executable statement, semi colon

C++: checking if a string consists of all numbers or not., character array, c style
C++: checking if a string consists of all numbers or not., character array, c style, sprintf

C++: compression, algorithm huffman, lossless data compression
C++: compression, algorithm huffman, lossless data compression, compression technique

C++: about constructor overloading, area of rectangle, area of triangle
C++: about constructor overloading, area of rectangle, area of triangle, area of circle

C++: constructor overloading, area of rectangle, area of triangle
C++: constructor overloading, area of rectangle, area of triangle, area of circle

C++: creating 2D array dynamically, cols, sizeof
C++: creating 2D array dynamically, cols, sizeof, textures

C++: Data types, struct, magnitude
C++: Data types, struct, magnitude

C++: Debug Assertion Failed!
C++: Debug Assertion Failed!

C++: Difference between Overriding and Overloading, scope resolution operator, static functions
C++: Difference between Overriding and Overloading, scope resolution operator, static functions, virtual functions

C++: deep n shallow copy, bang on, target
C++: deep n shallow copy, bang on, target

C++: equivalent to "realloc" in C++, array array, array size
C++: equivalent to "realloc" in C++, array array, array size, array

C++: eval function from javascript in C++?, best bet, swig
C++: eval function from javascript in C++?, best bet, swig, scripting language

C++: exponents, return result, exponents
C++: exponents, return result, exponents

C++: expression tree, dear friend, trees
C++: expression tree, dear friend, trees

C++: Find the greatest sum with moving cursor, towers of hanoi, 8x8 grid
C++: Find the greatest sum with moving cursor, towers of hanoi, 8x8 grid, radii

C++: Function overriding, possible solution, pointer
C++: Function overriding, possible solution, pointer, scope resolution operator

C++: Got a fatal error when trying to write a program in turbo C++3.0, programs in turbo c, c programs
C++: Got a fatal error when trying to write a program in turbo C++3.0, programs in turbo c, c programs, subset

C++: finding prime numbers between 1 and an input value, trunc
C++: finding prime numbers between 1 and an input value, trunc

C++: fstream, ofstream, open student
C++: fstream, ofstream, open student

C++: Hello, It's been a while, word string, single word
C++: Hello, It's been a while, word string, single word, functionality

C++: hailstone numbers, num num, scanf
C++: hailstone numbers, num num, scanf, logic

C++: header file
C++: header file

C++: How can I hide the system cursor, dominis
C++: How can I hide the system cursor, dominis

C++: Image processing with Visual C++, bibliographic source, library series
C++: Image processing with Visual C++, bibliographic source, library series, background knowledge

C++: input output manipulation, cheers
C++: input output manipulation, cheers

C++: Learning MFC, kallu, mama
C++: Learning MFC, kallu, mama

C++: linking error, linker libraries, obj file
C++: linking error, linker libraries, obj file, turbo c

C++: Memory leak, memory leaks, special tools
C++: Memory leak, memory leaks, special tools, localization

C++: macro expansion
C++: macro expansion

C++: magic matrix code, square matrix, middle column
C++: magic matrix code, square matrix, middle column, algorithm

C++: matrix multiplication coding, turbo c, multiplication
C++: matrix multiplication coding, turbo c, multiplication, using namespace std

C++: about memory allocation& virtual pointer, double dd, ints
C++: about memory allocation& virtual pointer, double dd, ints, eddies

C++: minimum of 4 values, x3 x4, elses
C++: minimum of 4 values, x3 x4, elses, mistake

C++: motherboard serialnumber, wmi, scripting
C++: motherboard serialnumber, wmi, scripting, microsoft

C++: multiply big numbers, google, c language
C++: multiply big numbers, google, c language

C++: Why must variables be declared before it is used, but not methods?
C++: Why must variables be declared before it is used, but not methods?

C++: operator overloading, operator overloading, valid reason
C++: operator overloading, operator overloading, valid reason, const

C++: Pointer and Preprocessor doubts, const pointer, writing a reference
C++: Pointer and Preprocessor doubts, const pointer, writing a reference, cpx

C++: Program to determine prime numbers, alex, declaration syntax
C++: Program to determine prime numbers, alex, declaration syntax, syntax error

C++: pesky core dump. pls help - string class??, stack size, probability
C++: pesky core dump. pls help - string class??, stack size, probability, threads

C++: pointers, error check, gethostbyname
C++: pointers, error check, gethostbyname, host info

C++: polynomial equations., degree polynomials, degree polynomial
C++: polynomial equations., degree polynomials, degree polynomial, iterative method

C++: Is it possible to inherit classes from STL classes?, memory leaks, string class
C++: Is it possible to inherit classes from STL classes?, memory leaks, string class, admin tools

C++: problem in c++ file handling, ios
C++: problem in c++ file handling, ios

C++: Random Integer, direct x 9, microsoft source
C++: Random Integer, direct x 9, microsoft source, dev kits

C++: Recursive Problem, solution problem, scanf
C++: Recursive Problem, solution problem, scanf, int main

C++: Rounding to specified decimal point length, decimal place, ceil
C++: Rounding to specified decimal point length, decimal place, ceil, 340000

C++: rand() in C++, random number, line 3
C++: rand() in C++, random number, line 3

C++: SAPI LoadCmdFromFile question, grammar
C++: SAPI LoadCmdFromFile question, grammar

C++: Since only one copy of each method is stored, what is the difference between static methods and normal methods?, static method, footprint
C++: Since only one copy of each method is stored, what is the difference between static methods and normal methods?, static method, footprint

C++: Solaris - select() returns -1...., file descriptor, sizeof
C++: Solaris - select() returns -1...., file descriptor, sizeof

C++: Sorting algorithm, array
C++: Sorting algorithm, array

C++: Storing Info in Files, stdin, c file io
C++: Storing Info in Files, stdin, c file io, output streams

C++: split a linked list into two linked list, helping others
C++: split a linked list into two linked list, helping others

C++: stat function, linux command, enough space
C++: stat function, linux command, enough space, dd

C++: string pointer, abc, memory location
C++: string pointer, abc, memory location, memory address

C++: syntax to access member data with iterators, member addresses, address value
C++: syntax to access member data with iterators, member addresses, address value, base address

C++: how to get system date, const int, mday
C++: how to get system date, const int, mday, ints

C++: Triangle types C programming question, scalene, isosceles
C++: Triangle types C programming question, scalene, isosceles, expert programmer

C++: Triangles in C, printf, syntax usage
C++: Triangles in C, printf, syntax usage, type declarations

C++: Get time in milliseconds in Windows, clock ticks, arbitrary point
C++: Get time in milliseconds in Windows, clock ticks, arbitrary point, clocks

C++: Undefined reference when linking., smart ass, cpp
C++: Undefined reference when linking., smart ass, cpp, c compilation

C++: how to use class function where 'c' calling convention is required, void pointer, int argc
C++: how to use class function where 'c' calling convention is required, void pointer, int argc, null return

http://en.allexperts.com/q/C-1040/f/using-array-brute-combinatorics-1.htm


C++: using DLL, dll, step guide
C++: using DLL, dll, step guide

C++: using fout, case statements
C++: using fout, case statements

C++: virtual constructor, dynamic memory allocation, destructor
C++: virtual constructor, dynamic memory allocation, destructor, virtual constructor

C++: Win32 WinProc - wParam, lowercase version, character key
C++: Win32 WinProc - wParam, lowercase version, character key, wm

C++: faakher, matrix operation, matrix class
matrix operation, matrix class, object oriented programming: Hi Faakher The main drawback of function is it increases the execution time as the main function is pushed inside the stack when the others are called. Function Overriding is the feature of object oriented programming suppose i have created a class called...

C++: This is about as far as i can go, int option, sort data
int option, sort data, keyboard: In a menu, you need a loop: bool done = false; int option; while(!done){ // do your printf() stuff here scanf( %d , option); switch(option){ case 1: // do things for 1 break; // put other cases here case 6: done =...

C++: Got a fatal error when trying to write a program in turbo C++3.0, turbo c environment, c extension
turbo c environment, c extension, likely culprit: Hi Aliya, Is it possible that you accidentally named your source file with a .c extension, rather than a .cpp? I m not familiar with the Turbo C++ environment, but based on that error, that s the most likely culprit. If that isn t the case, copy and paste...

C++: fies, strange question, somewere
strange question, somewere, note pad: First this question has very little if anything to do with C++ and programming, so is automatically outside the area I answer questions on. So the following may not be what you are after. Your assumption is that reading and writing binary data file, such...

C++: file and directory manipulation, david spector, directory manipulation
david spector, directory manipulation, contained files: zid , Thank you for your question. It is not clear whether you want to do a manual operation or write a program to do the copying, but since this is a programming forum, I will assume the latter! I m also assuming that you want to do this in Win32. ...

C++: file handling, space device, premnath
space device, premnath, word structure: dear harsha ! Here i give some idea s or tech s to do that! 1. Read a data file in terms of charecters. 2. You know how to differentiate a word from line ! ( a word may be separated from a line at each encounter of space , ; , ... ) ...

C++: file handling in C++, array size, integer type
array size, integer type, generic template: Hello shruti, thank you for the question. If you want to save an array to a file, here is some pseudocode. // Open the file for writing // loop over the array and write each value // (array[i]) to the file with a space in between // Close the...

C++: About file handling in C++, c standard library, file in c
c standard library, file in c, exact solution: Not definitively. This is because they are many ways one could approach this problem. The exact solution would depend on the specific circumstances - what other code were available, how big the records were, etc. However that having been said the most obvious...

C++: file handling in C++, array element, array class
array element, array class, code snippets: You do not say what format you wish to save the data as so I shall assume usual C++ practice and advise that you create operator and operator function overloads for your (generic) class. If your class template is oneDArray T then for the case of oneDArray...

C++: file handling in c++, heap allocation, bruce eckel
heap allocation, bruce eckel, stack class: Your program is not going to be short. You will have to write a stack class, which you should be able to do, if you understand dynamic allocation and stack. If you dont, then go get a data structures book, for example, Cormen s book. As for inputting from...

C++: file handling, punctuation conventions, use of comma
punctuation conventions, use of comma, hex format: First I am going to point out that _all_ data in a _text_ file is _character data_. Some sequences of characters might be able to be interpreted as integer values. However the problem is to define which ones. Let s look at some examples: 123456 -123456...

C++: file input output, david spector, number of bytes
david spector, number of bytes, searching the web: jimmy , Thank you for your question. A computer can read or write information (data) on hard disk drives, CD-ROMs, diskettes, etc. Such data is stored in named containers called files . A file has attributes such as its name, when it was created, etc.,...

C++: file permissions and C++, fprintf, fclose
fprintf, fclose, fopen: Hi, I am not sure what you intend to do here but try the following bit of code which writes into haha.txt and in this case the file would be owned (writable)by the owner of the executable. Regards, RaiD #include stdio.h int main(){ FILE * fd...

C++: file permissions and C++, operating system programming, c file io
operating system programming, c file io, programming question: This is not a C++ question. It is an operating system programming question. I assume you are using a UN*X or Linux type OS using the owner, group, world; read, write, execute permission mask style of permissions. Note that different operating systems - and...

C++: file permissions and C++, c runtime, fstat
c runtime, fstat, msdn library: Hello James, thank you for the question. I actually had no idea how to do this, since I ve never had to before, so I asked a coworker. He said that the C runtime functions stat() and fstat() should have you good to go. You can look these functions up in...

C++: files, ms win32, win32 systems
ms win32, win32 systems, sdk functions: I am a little confused as to why you are asking me (as a C++ expert) primarily about C! However in this case the simple answer is the same: There is no standard way to iterate through a folder (or directory) in C and C++. You have to use the operating system...

C++: filling up of a frame with 10bit words, byte values, frame object
byte values, frame object, integer types: In this case, no I do not think std::bitarray will be of much use as it cannot output the data in the format you require. In fact at first look I think the best thing to do is to write a class that wraps a collection of 900 byte values (unsigned char) and...

C++: find download complier c++ which one?, linux junkie, development environments
linux junkie, development environments, sized projects: Hi Tom, There are several good development environments for Windows, but my all time favorite is certainly Microsoft s Visual C++. I m a bit of a Linux junkie these days, but for beginning development, I ll recommend it every time. It features really cool...

C++: find out hard disk serial number of remote computer in LAN, example source code, david spector
example source code, david spector, c programming language: Sanjay kumar, Thank you for your question. This kind of task can done using the remote programming features of your operating system. I suggest that you post this question in the appropriate System Administration topic area at www.experts-exchange.com,...

C++: finding prime numbers between 1 and an input value, sieve of eratosthenes, boolean data type
sieve of eratosthenes, boolean data type, array elements: Dear farrah ! Actually its not a problem , purpose of the variable isprime here i used to save only two values ( say 1 true 0 false ) , You may ask why i declared it as a int instead of boolean , here is the answer ! I actually programmed that...

C++: finding size of a file and delete, question category, language library
question category, language library, allexperts: ------------------- FOLLOWUP ------------------- I have read your ratings message and note that you may be using C or AllExperts have stripped the ++ (plus plus symbols) again, possibly replacing them with spaces. If you are using C rather than C++...

C++: floating point arithmetics in OpenGL, floating point numbers, point arithmetics
floating point numbers, point arithmetics, visual c 6: Hello Cem, I have always used 0.00001f as my epsilon value. Works well enough. The algorithm I use for calculating floating point error is as follows(pseudo-code): if(result - fabs(number1 - number2) = episilon) // floating point error result...

C++: floating point arithmetics, floating point numbers, visual c 6
floating point numbers, visual c 6, david spector: cem , Thank you for your question. You can find lots of tutorial information about floating point precision by searching the Web. A simple way to determine the precision of an elementary floating point calculation is to perform it twice, once for values...

C++: follow up to string manipulation, output string, string input
output string, string input, scanf: Hello katrina, I think that you are overcomplicating your problem here. You take input from the user, then print out each letter with a * in between. In order to do this, you only need to print out each array sub, then a * . One problem I did see above...

C++: I have the following problem..., bloodshed c compiler, hdc hdc
bloodshed c compiler, hdc hdc, hbitmap: Hello rich, thanks for the question. It takes a couple of steps to render a loaded bitmap on the screen. Also, when you say redraw the output every set interval I assume that means every frame. The following code sample should help you out. This is also...

C++: forloop, c operation, general knowledge
c operation, general knowledge, increments: Hello sunny, If it s general knowledge about the for loop you want, I will be more than happy to provide some insight. If it is a specific problem involving for loops, I will also be more than happy to help, if you provide enough information. So here we...

C++: form view, david spector, dialog folder
david spector, dialog folder, folder icon: steve , Thank you for your question. To see your main dialog box, select menu item View, then Workspace. Then click on the Resource View tab. Then click on the plus sign to the left of the project Resources folder icon. Then click on the plus sign to the...

C++: I found the answer to a question I asked earlier, and wanted to thank you for your help, comeau c, ms vc
comeau c, ms vc, loading modules: Thanks for the information. I rejected your question because until you asked I had not looked into the UN*X dl API calls so was not sure of my facts. As such the information I gave may not have been up to quality...nice to know I hit the nail on the head...

C++: fseek(), c standard library, standard c library
c standard library, standard c library, letter positions: First a few points. I do not know if you intended it but you are asking this of a C++ expert not a C expert. I mention this as fseek forms part of the standard C library file operations. Of course the C++ standard library inherits these functions, but they...

C++: fstream, handy functions, fscanf
handy functions, fscanf, ftell: Hello Nadia, thank you for the question. Sorry it has taken so long for me to get back with you, I ve been on vacation for the holidays. For file i/o, I never liked the C++ version of it. It is more convoluted, and slower than the C functions. I ll...

C++: fstream, two streams, extraneous data
two streams, extraneous data, relevant functions: This is not just a C++ problem. It is a problem in the way files and file streams in general work. You do not directly. A stream of data is just that - a stream. You write it or read it sequentially. File streams however do usually have random access allowing...

C++: fstream
Hi, Try the following and let me know if it works ! [1] Get the tell() of the start of the line to be deleted. [2] Read the remaining lines following this line. [3] Go back to the start of the line [4] write down the data [5] Put an end of file...

C++: fstream, open test, binary file
open test, binary file, test program: Yes you can. But you have to close the previous file _before_ opening another otherwise the open will fail. Either that or your stream is in an erroneous state for some other reason. Some error checking on the stream state might be a good idea! Also please...

C++: fstream as a class member, copy constructor, compilation time
copy constructor, compilation time, assignment operator: The problem is that std::fstream objects are _not_ designed to be copied. In fact copying and assignment of iostreams is forbidden by std::basic_ios which, eventually, is a base of std::fstream. This is because std::basic_ios declares and does not define...

C++: fstream variable as data member for both read and write in c++, static data members, constructor function
static data members, constructor function, default constructor: In a constructor you initialise data members and base classes using a constructor initialiser: class myfile { public: myfile( char const * pathname ) : m_file( pathname, std::ios::in|std::ios::out|std::ios::binary ) // ... { //...

C++: fstream, iostream library, c iostream
iostream library, c iostream, standard c library reference: First, unless you are using a really old version of the C++ library - by which I mean pre- ANSI / ISO standard C++ - the names of the header file is just fstream - the standard C++ library headers now have no .h suffix. Note that the C++ standard was published...

C++: full-screen Mode, david spector, maximum area
david spector, maximum area, internet explorer: Mohammad , Thank you for your question. There are several ways you can implement a full-screen mode. Probably the best is to create a window with the same size as the Active Workspace. Assuming you are not using MFC, you can create a window by calling the...

C++: full-screen Mode, devmode, maximum area
devmode, maximum area, screen mode: Hello, If this is a windows application, theres a couple of techniques to do this. To get rid of the minimize and maximize buttons, put the following line in your CreateWindow function as the 3rd parameter: WS_POPUP | WS_VISIBLE That gets rid of the...

C++: function declarations/prototypes, visual c 6, array array
visual c 6, array array, error c2440: John, Thank you for your question. lstrcpyn is a standard function in my Standard Edition Visual C++. I m not sure why your compiler can t find it. It is declared in file winbase.h, as follows: WINBASEAPI LPSTR WINAPI lstrcpynA( LPSTR lpString1,...

C++: function overloading, overload resolution, static class
overload resolution, static class, source type: Hello matthieu, thank you for the question. Your problem is that your Super class has no idea that SubA and SubB derive from it. Your Construct function takes pointers to those respective types, and a Super isn t either one of them. The way that works is...

C++: function overriding, scope resolution operator, space collision
scope resolution operator, space collision, entity class: Hello june, thank you for the question. Function overridding is useful when you want to have multiple derived classes implementing a base class function. You can put the common code to all of the derived classes in the base class function, then in each...

C++: About function prototype, null pointer value, boolean expressions
null pointer value, boolean expressions, conversion function: OK let s break it down: void * is a type, a pointer to an unspecified type. operator is a keyword that introduces some sort of overloaded operator function, it is a function declaration as indicated by the (). The operator keyword when followed by...

C++: How to make a function return a constant int, const int size, c standard library
const int size, c standard library, array dimensions: You cannot use std::bitset in this way, just as you could not use size for the dimension of a non-dynamic built in array, and for the same reason: const int size = (const int) some_function(3); int int_array[size]; // Not allowed, arrays sized at...

C++: About a function that transforms a integar into string, program source files, integar
program source files, integar, s parameters: Yes. pow is not a built in feature of the core language. It is a function that is part of the language library - in fact it is part of the C language library that C++ incorporates. As it is a function the compiler prefers that it has seen at least a declaration...

C++: this -> function, static member functions, hidden argument
static member functions, hidden argument, self reference: Dear Ken, Thanks again for your question. Well first of all, have a look at this detail of this pointer. this Pointer this this- member-identifier The this pointer is a pointer accessible only within the nonstatic member functions of a class, struct,...

C++: functions, floating point numbers, ftoa
floating point numbers, ftoa, string representation: Hello Ali, thank you for the question. I m not sure what you mean by knowing the program or guide of those functions, but I ll assume you want to know what they do, which I ll be happy to oblige. atoi basically stands for ASCII To Integer , it...

C++: functions, isdigit c, ftoa
isdigit c, ftoa, c int: I give you one of them; You should be able to do the rest, yourself. I you still have problems; you may contact XtoY@shabah.net int atoi(const char *nptr){ int c; long total; int sign; while ( isspace((int)(unsigned char)*nptr)...

C++: functions, command shells, command interpreter
command shells, command interpreter, command shell: The system function takes a single C-style string parameter (i.e. a zero terminated array of characters), runs a command interpreter (aka command shell or shell) and passes the string to it to execute. In this it is totally system dependent, in that it uses...

C++: functions, expression syntax, declaration syntax
expression syntax, declaration syntax, parking meter: there are many errors. For instance: 1. you have to put a ; at the end of getData() prototype 2. you have not closed the main function while opene the declaration of other functions. 3. instead of ; you have to use { in declaration of calculateFee()...

C++: funcutions, software development environments, software development environment
software development environments, software development environment, david spector: naveed shahzad , Thank you for your question. Standard C++ comes with two run-time libraries that can perform file input/output, called the C and C++ runtime libraries. These libraries contain functions to delete files and enumerate the files in a particular...

C++: GAME PROGRAMMING, wallace and gromit, 3d dimension
wallace and gromit, 3d dimension, 3d role: Well, I cannot go into too much detail as that sort of level of advice would fill several books - even assuming I knew exactly what sort of games you were thinking of developing and the platforms (hardware and operating systems) you wished your games to run...

C++: Game Of Life Algorithm, ansi c language, c standard library
ansi c language, c standard library, two dimensional array: Have you tried to use this random function you are asking about? If so you will soon find it is in fact called rand - at least I assume this is the random function you refer to, as this is the C standard library function to obtain a pseudo random number that...

C++: Gaming Software Help, programming genius, matrix math
programming genius, matrix math, aniamtions: Hello again Nathan, thank you for the question. I ve played with Python a bit, but I m far from an expert in it. Python is a high level scripting language, and shouldn t really be used for overall engine development, if that s what you are saying. With...

C++: GDB with threading, multithreaded program, manis
multithreaded program, manis, execution: Hi Manish, Not all systems having GDB support threads. On your GDB execution for a multithreaded program, please type: info thread on the GDB prompt. This would display the thread ids of all the threads in that process if the GDB on your system supports...

C++: General_Info, graphical buttons, cdialog
graphical buttons, cdialog, mfc application: Hello, I don t know if you can make those kind of buttons in VB 6.0, I ve never used it. In C++ all you do is make an MFC application and derive a class from CDialog and you can then create your own buttons and edit boxes and whatnot to be the size and...

C++: Getline, int age, line character
int age, line character, input character: The reason is that the previous read from cin into the zipcode string extracted all characters from cin, skipping leading white space, until the next white space character was encountered - in this case the end of the line. This white space character is the...

C++: GetMousePos, win32 function, aswell
win32 function, aswell, thanks in advance: Well if you read what the error says and look at what you actually wrote and not what you thought you wrote you could find the error. You got the function definition form correct for main() so I shall assume you know how to define functions in C and C++. ...

C++: Glad to see you here again!, inheritance graphs, class hierarchies
inheritance graphs, class hierarchies, multiple inheritance: I have been busy with some work on and off over the last year or so which involves me being away during the week - which is why I have only been on question answering at the weekends for much of this time. Oh go on ask away then... 1/ There are virtual...

C++: Global Objects Creation Priority, compilation units, translation units
compilation units, translation units, predictable fashion: OK. There is _no_ way to order the initialisation of global objects (i.e. non-local static objects). There are _no_ guarantees what so ever on what order non-local static objects are created. The order can differ between build tools, different versions of...

C++: GPA, tabular form, c compiler
tabular form, c compiler, gpa: Awwal, The trick to doing this in DOS is setting the output field length. Most of the time when you print out a number, the length of the number gets printed and the program moves on. However, you can force the program to set with width of the output field...

C++: Graphics Library, bmp jpeg, graphics libraries
bmp jpeg, graphics libraries, anytype: Hello Branko, thank you for the question. There are 2 ways you can go about doing simple bitmap rendering. One is to use native Windows GDI functions, and the other I know of is to use DirectX. I wouldn t recommend the second option. If you need any help...

C++: GUI design, c programming language, david spector
c programming language, david spector, website colors: william , Thank you for your question. This does not appear to be a question about the C++ programming language. Perhaps you made a mistake in selecting the question topic area. Please feel free to submit questions specifically about the C++ programming...

C++: A game engine, game engine, handheld game
game engine, handheld game, wii: I think this link would be useful for you: http://en.wikipedia.org/wiki/BREW Brew and J2ME are two commonly used platforms for mobile gaming. If you are not so C++ biased, I would ask you to consider J2ME as well, since java is a more managed language and...

C++: gcc 2.95 & gcc 3.x, external developers, command line options
external developers, command line options, integration problems: Hello James, thank you for the question. We just had this issue at my place of employment a couple of weeks ago, porting all of our gcc3.x stuff to gcc4.0. The reason behind it is due to what the developers change in each version. In gcc4.0, there are...

C++: gcc errors, compilation method, ld library
compilation method, ld library, file library: Hi Ofer, Header files are needed for the function prototypes. The function definition would be in a file (library in technical term that might be .a or .so where the former is for a static lib while the latter one is for dynamic one). Please check if...

C++: general, java j2ee tutorial, wustl edu
java j2ee tutorial, wustl edu, rough knowledge: For java look at: java.sun.com/docs/books/tutorial/ www.ibiblio.org/javafaq/javatutorial.html micro.magnet.fsu.edu/primer/java/scienceopticsu/powersof10/ For J2EE look at: java.sun.com/j2ee/1.4/docs/tutorial/doc/ java.sun.com/j2ee/tutorial/1_3-fcs/...

C++: graphics, game programming gems, major bookstores
game programming gems, major bookstores, opengl superbible: Hello ish, thank you for the question. The number one book for computer graphics I can recommend is the OpenGL Superbible, which is available online and in major bookstores everywhere. Also, any of the Game Programming Gems series would also aid you in...

C++: graphics using porland c++, gdi functions, device context
gdi functions, device context, objective function: Hello yosreman, thank you for the question. Drawing these equations shouldn t be any problem with some handy Windows GDI functions. First, get the handle to your window from the function call to CreateWindow(or if this is a console application you can call...

C++: graphics via OpenGL, matrix stack, mapping textures
matrix stack, mapping textures, opengl matrix: Hello naveed, thank you for the question. Mapping textures in OpenGL isn t too hard. You must first understand how texture coordinates work. The entire image can be thought of as 2 sets of points, 0, 0, and 1, 1. To visually illustrate (1,...

C++: graphics, memory device context, loadimage function
memory device context, loadimage function, bmp image: Hello karthik, thank you for the question. To display bitmaps on screen, in what I m assuming is a Windows application, the function LoadImage() will load the bitmap info into memory and return a handle to the bitmap, and the function BitBlt will blit the...

C++: grphics via OpenGL, grphics, texture mapping
grphics, texture mapping, access method: Hello naveed, thank you for the question. Now that you have your room, you want to color its walls. This shouldn t be too hard. I m not too familiar with glut like I am with native OpenGL, but I m sure if there is a function to create a cube there...

C++: Hardware Programming resources, hardware programming, premnath
hardware programming, premnath, programming resources: Dear Smart! We can program any type of hardware using C , but i don t know what specific hardware you going to program or seeking resources in NET, There are lot of resources available in NET I cant recommend you any web page or resources in net until...

C++: Hello, on breaking down strings, punctuation symbols, array element
punctuation symbols, array element, atoi function: FOLLOWUP: --------_ One thing I forgot to mention, if you wish to output a char as its numeric value rather than as a character then you have to convert it to another type of integer first, for example: int char_value( a_string[0] ); ...

C++: Hello, Rai on io input.., file stream, int c
file stream, int c, character value: Hi James, Please read the man pages for int fputc(int c, FILE *stream); int fputs(const char *s, FILE *stream); int putc(int c, FILE *stream); int putchar(int c); int puts(const char *s); int ungetc(int c,...

C++: Hello, It's been a while, vote of confidence, james root
vote of confidence, james root, favorate: Hello, thanks for the vote of confidence! Now, as to your question. I am not sure what you wish to do with the file and directory information - you say a way to get all the files & folders that exists in a folder, and save those values into a variable....

C++: Help on a basic level: resource files, c source code, visual studio 6
c source code, visual studio 6, microsoft visual studio 6: First I must point out that this is _not_ a C++ question. It is a question about how to use a specific product and you should refer to the documentation that came with that product. Unfortunately as VC6 is now 3 revisions behind the current VC release the...

C++: Help with a C++ project, global variables, void function
global variables, void function, test score: Dear Mckale! Many students requested the same program , no option to make , i have to write the program for all , so here is the program what you requested , i have checked this program with lot many data s and its workin fine , due to my tight schedule...

C++: Help! Create a Person.h header file, david spector, homework questions
david spector, homework questions, genuine attempt: Wayne , Thank you for your question. It is against my policy to do homework questions. I can help you with work that you have already done, but I cannot give you full answers. Please attempt to do part of the work, and then ask a specific question when...

C++: Help with expression tree, expression tree, switch node
expression tree, switch node, character array: Dear Jared The code you have right now feels more like C than C++. It seems you re looking to assemble the answer from the net. It would be great if you spend some time in understanding the code and learning the language. One good resource is: http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html...

C++: Hexa, david spector, byte value
david spector, byte value, x89: az001 , Thank you for your question. Some of the 256 characters that can be specified by an 8-bit value (a byte) are printable, and some are not. Some depend on the current system language. When you want to specify a specific character by its encoding...

C++: Hey Eddie, question about a privacy problem ;), privacy problem, messenger programs
privacy problem, messenger programs, silly question: Hello Jamie, thank you for the question. Unfortunately, no, there is no way to change it. There s no access to the code behind it. All the program is an executable made from the code. There s no way to decompile it or anything. I would suggest having...

C++: Hi David, 1 - Microsoft..., visual c 6, microsoft visual c
visual c 6, microsoft visual c, modulus 11: John Hamilton , Thank you for your question. Please resubmit, showing all actual error messages and including line numbers, at least on the lines referenced by the error messages. Or use some unique strings to show which lines are referenced by which error...

C++: Hi David,I am going to..., visual c 6, vertical scrollbar
visual c 6, vertical scrollbar, dialog boxes: Ramin , Thank you for your question. There are many ways to display your own graphics. All of the techniques you have mentioned will work. Windows is not written to make programming easy, so expect to spend a lot of time studying the MSDN Library and writing...

C++: Hi, heap data structure, heap allocation
heap data structure, heap allocation, stack allocation: I m sorry I forgot to tell you about deallocation. Whenever memory is allocated using new, it must be deallocated using delete. Whenever there is a function call, the context of calling function is saved and stack grows to include the context of the callee...

C++: Homework Help, compusa inc, sales tax rate
compusa inc, sales tax rate, task functions: Well, I generally don t do other people s homework for them. So without a more specific question, I would suggest you make sure you can do all of the required operations on paper (with a calculator if need be). That way you ll be in a better position to write...

C++: Homework Help, compusa inc, sales tax rate
compusa inc, sales tax rate, little piece at a time: Kristen, As you suspected, I cannot help you. Doing your work for you will not help you. It is the worst thing I could do for you. Only by doing your own work, as difficult as that may be, will you truly learn. If you don t want to learn but just pass your...

C++: HWND of where the mouse is clicked on ..., windows functions, start menu
windows functions, start menu, mohammad: Hello mohammad, My experience in C++ has been graphics and math related stuff. I make video games. I ve never heard of anyone trying to do what you want to do. But, I figured I would drop some names of some helpful windows functions that you might not...

C++: HWND of where the mouse is clicked on ..., win32 gdi, screen coordinates
win32 gdi, screen coordinates, ms development: Did you try the MSDN library? If so did you try a query like “HWND near point”? I tried this using the local viewer application for the CD/DVD July 2004 edition and the forth item – as I dimly remembered - was the Win32 GDI API function WindowFromPoint. ...

C++: HWND of where the mouse is clicked on ..., david spector, hook code
david spector, hook code, msdn library: mohammad , Thank you for your question. It is not usually necessary to give a process information about mouse clicks in windows owned by other processes. For this reason, Windows does not make this easy to do. Please think about whether this is really what...

C++: ".h" file on VC++ 2005, sunysb edu, c standard
sunysb edu, c standard, test programs: Probably you are using the old convention. The c++ standard has changed the convention of including header files. Now C++ standard headers do not end with .h. For details see: http://www.daniweb.com/forums/thread11430.html and http://www.cs.sunysb.edu/facilities/FAQ/gccfaq/standard_header_files.html...

C++: hailstone numbers, ival, endl
ival, endl, stdafx: Reid, I m not sure what you re trying to accomplish with this program. What is it calculating? Also, how many times is it supposed to run? I changed the code (just a little bit), and it would print out anywhere from 2 to 4 numbers in the sequence. Here is...

C++: hailstone numbers, david spector, exact line
david spector, exact line, ival: Reid Bretherton , Thank you for your question. I regret that I am unable to do debugging for people due to the volume of questions received. This kind of problem is usually easy to solve by stepping through the code with your debugger, looking at the values...

C++: hailstone numbers, ival, stdafx
ival, stdafx, samarth: Hi Reid. I am extremely sorry for the delay, but I am in middle of my exams and hence couldn t help. The only thing wrong with the program is the while condition. Instead of while(compOne==1) it should be while(compOne!=1) Initilly,...

C++: how to handle a system using c, david spector, system programming
david spector, system programming, database programming: suresh , Thank you for your question. Unfortunately, you have not given me enough information for me to be able to answer your question. Please resubmit your question with more details or a clearer description and I will do my best to answer. David Spector...

C++: handling extreme large numbers in c++, arithmetic operators, quadratic residues
arithmetic operators, quadratic residues, iit delhi: Hello Sandeep, Here is a solution I found on codeproject.com that may be useful to you: http://www.codeproject.com/cpp/largenumber.asp That will allow you to manipulate extremely large numbers by creating custom classes and overloading the arithmetic...

C++: header file, language constraints, c languages
language constraints, c languages, weird errors: Hello makis, thank you for the question. Sorry, but one of the language constraints of the C/C++ languages are that you can only have one main function per application. If you have more than one, then you are going to get weird errors, not to mention a...

C++: header file, followings, c files
followings, c files, mul: It is not clear what you already have. You know that in one project (program), you cannot have 3 main functions. So I pressume you have 3 functions like add(), sub(), and mul(). If you so, you create a file called myheader.h had put the followings in it: ...

C++: about header files in c/c++, integrated development environment, c source code
integrated development environment, c source code, command line switch: First write the source code you require in the header file and store it in some project related directory. Ensure that the compiler knows about this directory by setting the include path (e.g. for many compilers this is done using the -I or /I compiler command...

C++: hello!i have now created..., switch statement, case label
switch statement, case label, strange error: Maki, Sorry for the delay in my response - drama with my roommate and the girls he deals with tends to throw me outta wack. This is a strange error. While I never personally have tried to use a switch statement with text as oppose to numbers, I don t see...

C++: hello need to know, communication student, learning c
communication student, learning c, c tutorials: Ahmed, I can answer two of your questions but not all three. 1) You can start learning C++ just about anywhere. Going to your local bookstore would be a good start. Learning what your local university uses for C++ textbooks, and purchasing a copy of that...

C++: hello, about passing functions again..(Part II), null pointer value, standard c library
null pointer value, standard c library, array types: Oddly, although you get a load of very long names in the error this is due to expanding the names of all the class templates used by the standard C++ library and in fact can be a real problem in seeing what is actually the problem. The problem here is:...

C++: hello, about passing functions again.., good habit, abc index
good habit, abc index, correct dimensions: FOLLOWUP --------------- I read your rating comments. Please note that I am not angry that you changed the code I sent you. I was just pointing out that I thought your changes would not produce the expected results as posted originally and why I thought...

C++: help, c getch, getch c
c getch, getch c, hex system: Normally real numbers could apear like 3.567e-10 which lets you have very small and very large numbers. However in your case, it is a simplified version and so it can be easily used for integer. You only need to use the first part which reads the integer part...

C++: help!, strcpy
strcpy: Do it like this: #include string.h struct gateType { char type[5]; int input1PinOrder; int input2PinOrder; int outputPinOrder; }; gateType myGates[8,3]; main(){ i = 2; j = 1; strcpy(myGates[j][i].type, and...

C++: help!!, string class, strcpy
string class, strcpy, array: Hello maki, thank you for the question. If you want to be able to directly assign a value to a string, the std::string class has the = operator overloaded for that purpose. Otherwise, it is illegal. The wasy to do this is with a call to strcpy to copy the...

C++: help!, syntax error, strcpy
syntax error, strcpy, snippet: Hi, You should use the strcpy as follows: // if char *z contains and then if (sizeof(myGates[j][i].type) = strlen (z) + 1) strcpy (myGates[j][i].type, z); P.S. Check for any syntax error as I have written the snippet here directly. Regards,...

C++: A help needed (Urgent), master boot sector, master boot record
master boot sector, master boot record, ms office document: Hi Mr.Aladdin, Thankyou for your note at AllExperts.com. I went through your offer carefully and i ve got experience regarding these problems. I would like to know, a) Which company do you belong, and where it is located? b) Specify the details...

C++: help please, premnath, int num
premnath, int num, endl: Dear Donald ! You have done almost but the only thing wrong is that this series calculate all terms as positive but waht actuallully have to do is the odd and even term should have opposite sign This can be acchieved by inserting a sign data which toggles...

C++: help with two problems, federal tax deductions, gross salary
federal tax deductions, gross salary, insurance deductions: Hello antonio, thank you for the question. I m not sure why you asked me, it seems you ve already written the code for these. 1. float InverseSum(float x, float y) { return 1 / (x + y); } That s all there is to the first problem. The second is...

C++: help, sort words, string word
sort words, string word, endl: Hi John, Instead of typedef vector string ::size_type vec_sz; please go for iterators. vector string ::iterator iter = words.begin(); for (; iter != words.end; ++ iter) { // your logic for counting. } Hope this helps. - Rai...

C++: How can I hide the system cursor, system cursor, david spector
system cursor, david spector, setwindowshookex: Justin, Thank you for your question. The call SetCursor(NULL) is ignored by the system on some versions of Windows. To set the cursor invisible, construct an actual invisible cursor using the CreateCursor function. See the MSDN Library documentation for...

C++: Im new, and am very confused, using namespace std, c standard library
using namespace std, c standard library, iostream library: 1/ The C++ ISO/ANSI standard library header file is iostream. Before there was a standard for C++ the traditional iostream library used a header called iostream.h. The lack of the .h extension is common throughout _all_ C++ standard library header files....

C++: Image processing with Visual C++, image processing and pattern recognition, david spector
image processing and pattern recognition, david spector, graduate project: Alireza , Thank you for your question. I do not know of any Web sites that would help you. You can learn how to search the Web for the information you need. Many universities post their detailed class notes on the Web. If you can be more specific about...

C++: Images in C++, borland turbo c, images
borland turbo c, images: Hello Shishir, thank you for the question. Could you please specify what you mean by interuppts? I m not familiar with that term. Could you also please specify which functions you are trying to use to load in the image. That would be extremely helpful in...

C++: Increment operators, increment operator, decrement operators
increment operator, decrement operators, increment value: For the build in integer types it may well not be (and, as with the rest of this subject, the same goes for the pre- and post- decrement operators as well). So in C ++k and k++ were the same, k had to apply to a built in type that supported these operations,...

C++: Initialization order in c, static data members, shift operator
static data members, shift operator, virtual base: Consider: Why do we construct the base of a skyscraper first? Is there a technical reason or is it just because the construction company wanted to do so? Very little if anything that is mandated in the C++ standard is done on the whim of Bjarne Stroustrup...

C++: Integrating Philips API in VC++6, david spector, lib files
david spector, lib files, philips speech: kash , Thank you for your question. 1. To integrate an API: * Add #include xx.h to your main .cpp file. * Add xx.lib to your link file list in Project Settings 2. Do not copy files into your VC folder. Copy them into some other folder. ...

C++: Interaction with a c++ program from a website..., cgi classes, dharmender
cgi classes, dharmender, cgi applications: Hi Brian, I would suggest C++ if you are well-versed with it. You could write CGI applications in C++ (multi-threaded) and I am sure that it would be faster than Java/Perl. You can find lots of C++ CGI classes on the net for a quick start. As far as the...

C++: Introduction to C++, free c compiler, visual c environment
free c compiler, visual c environment, david spector: Donna Amaral, Thank you for your question. Generally, all programming done in a school course is done on a school computer network that has Visual C++ installed. If you are taking the course, ask the instructor how to get access to the Visual C++ environment....

C++: Introduction, david spector, device driver
david spector, device driver: zaheer , Thank you for your question. Unfortunately, you have not given enough information for me to be able to answer your question. Please resubmit your question with more details or a clearer description and I will do my best to answer. David Spector...

C++: Invalid Handle Error while using WINAPI call GetModuleFileNameEx in c++, borland c builder, c builder 6
borland c builder, c builder 6, borland c builder 6: First I must apologise for not getting back to you sooner. I work away from home at the moment and forgot to place myself on AllExperts vacation this week - sorry! Yes you missed the point on something - FindWindow returns a HWND, a HANDLE to a window not...

C++: IRQ15, visual c 6, david spector
visual c 6, david spector, microsoft visual c: Mohammad , Thank you for your question. Windows does not support IRQ programming. Windows uses an entirely different model of device control. Windows virtualizes (hides) the IRQs. In general, you cannot do DOS-style I/O under Windows. You can read...

C++: imapi.bin, unlimited internet access, winfix
unlimited internet access, winfix, hurricane charley: Dear Tom, I m so sorry it has taken so long to reply. I still have no power from hurricane Charley. It destroyed everything in Orlando. I had an error one time like that, but it disappeared when i reinstalled the compiler. have you tried doing that?...

C++: increment/decrement, comma operator, sequence points
comma operator, sequence points, sequence point: You are modifying x in both cases more than once in an expression. This is _not_ allowed and is illegal in C++ and therefore anything can happen! Under the rules for expressions (section 5, paragraph 4 of the ISO C++ standard): Except where noted,...

C++: info, devcentral, samarth
devcentral, samarth, c tutorials: Hi Krishna. Here are some sites.You can always find more by typing c++ tutorials at google.com http://www.functionx.com/visualc/ http://devcentral.iftech.com/articles/MFC/vc6_mfc/3.php http://docs.rinet.ru:8083/VidimyyC/ Bi Samarth...

C++: inheritance, david spector, member variables
david spector, member variables, ctor: sid , Thank you for your question. 1. No, classes need not have ctors. If a class has no class member variables, or if it has them but they need not be initialized, there may be no need for a ctor. Ctors are for the programmer s convenience; there is nothing...

C++: inheritance, public inheritance, private variables
public inheritance, private variables, class variables: Hello vikas, thanks for the question. To answer your question, I had to do a bit of refreshing myself. No, private members are not inherited. In fact, private members are never inherited, even with public inheritance. I always just made my base class variables...

C++: inheritance, arrow point, arrow points
arrow point, arrow points, would make sense: Dhivya, I believe the arrow points towards the derived class. Hence, the derived class takes on the characteristics of the base class. While it would make sense, in a certain way, to have the arrow point from the derived class to the base class, that would...

C++: on inheritence, polymorphism in c, inheritence
polymorphism in c, inheritence, virtual function: Here the display () in B overrides the one inherited from A. Now C gets what B has got (as it doesn t have any overriding function). This case is decided at compile time. Try to study about virtual function to get more information about polymorphism...

C++: initializations, contiguous block, memset
contiguous block, memset, elementes: Hello Cem, thank you for the question. Initializing a string like this: char szString[30]={ }; is fine. You could also do the following: char szString[30] = {0};. The way that I always initialize my objects out to 0 is with the function memset()...

C++: input output manipulation, application programming interface, microsoft visual c
application programming interface, microsoft visual c, code sequences: The C and C++ language standards have _no_ support for such functions - so the Turbo C function you mention is something invented by Borland. From what you say you are writing MS Windows console programs or - in the case of Turbo C - possibly MS DOS. ...

C++: inquiry?, c programming language, game cube
c programming language, game cube, operating systems: Hello talal, thank you for the question. There are a number of programs writting in C/C++ that are used frequently. Any game you ve played on the XBox or Game cube were written in C++, while all games written for the PS2 were written in C. Operating systems...

C++: inserting bitset into set, c standard library, bitset
c standard library, bitset, default operation: The C++ standard library associative collection types, such as std::set and std::map, are sorted collections of values. To be able to determine where in a sorted collection a given value should go (e.g. when inserting a value into a std::set) the values in...

C++: int x = a+++b;, increment operator, int tmp
increment operator, int tmp, initial state: Well although a++ is evaluated first because post-increment has a higher precedence than add the fact is that you are using _post_ increment - that is the result of a++ is the original value of a, then a is incremented, thus the value of a++ passed to + is...

C++: interface, david spector, standard template library
david spector, standard template library, virtual functions: surinder, Thank you for your question. An Interface is a class with pure virtual functions. Such a class must be used as a base class for a derived class, since a pure virtual class cannot be instantiated (its actual function definitions are unknown). ...

C++: What is the internally difference if I read a data as bytes, characters, string and stream?, integer types, bool c
integer types, bool c, modern architectures: Depends what you mean and in what context. Also data is plural so you cannot read a data – it is a datum. If you mean in C and C++, then the char type is often a signed or unsigned integer of byte (8-bit) size. It is also the smallest built in C and C++...

C++: introduction to c++ programming, microsoft visio, desk check
microsoft visio, desk check, stdafx: Hi Christy. Sorry for the delay. Am in mid of my exams.Hope this is what you want. #include stdafx.h #include iostream using namespace std; int main(int argc, char* argv[]) { int sales[4],total; char choice; cout TOTAL...

C++: in_stream text files, input streams, character array
input streams, character array, doe john: I am not going to write the program for you but this is the outline: Open input file 1 for reading on std::ifstream 1 Open input file 2 for reading on std::ifstream 2 Open output file for writing, truncating existing data unless you wish to append data...

C++: isxdigit(), d7, lower case
d7, lower case, digit: Look at the following to see how professionals define such function: http://www.greatsnakes.com/Sepal/d0/d7/isxdigit_8c-source.html However, if you don t understand what they are doing, you just need to check if the digit is in this range: (ch = 0...

C++: isxdigit(), ascii code, code ch
ascii code, code ch, decimal representation: Hi maki: I hope u ll be fine. I assume ur function takes a char parameter. Lets call it ch. So that now ur function s prototype look like: isxdigit(char ch) What u need to do is to convert the ch to an int like int code = ch; Doing so will convert...

C++: java Vs c++, programming language java, learning c
programming language java, learning c, windows application: Hello Abdi, thanks for the question. I m not sure which of the 2 is more popular. Both are used for a wide variety of things. Java can be embedded into web applications using Applets. Also Java seems to have a better system of setting up GUI s. C++ is by...

C++: Knowing when a digit is a digit and a letter is a letter, c student, writing programs
c student, writing programs, digit: hello! humm an interesting situation :) There is a function isdigit() defined by the standard C++. it is used as this . say int a ; cin a ; if ( isdigit ( a) ) // do somethging this function return ture if a is a digit and else...

C++: Knowledge Of Computer Language, david spector, beginners resources
david spector, beginners resources, learning c: Kris Lyons, Thank you for your question. I regret that I am unable to guide beginners in learning C++, both because of the volume of questions received and because I do not know of learning resources available on the Web or elsewhere. My expertise was developed...

C++: What kind of variables and functions should be public, or private?, christmas functions, intricate details
christmas functions, intricate details, merry christmas: Merry Christmas, functions that could be used as API (user use them) should be public while the functions that deal with intricate details should be private. Almost all variables should be private unless and until some very special need arises. Regards,...

C++: What kind of variables and functions should be public, or private?, internal implementation, implementation detail
internal implementation, implementation detail, implementation details: Public interface member functions should be public. That is, the members functions that user s of your class are supposed to use are public. Internal implementation details, including data members, should be private, or if really necessary, protected. ...

C++: my knowledge, david spector, neat screen
david spector, neat screen, marketable idea: clarence , Thank you for your question. I was 20 when I started programming professionally, so I know what you are talking about. Your achievements are impressive. There are many true stories of teenagers who wrote operating systems or game programs...

C++: Large Multidemensional Arrays, fluid dynamics problems, dynamic memory allocation
fluid dynamics problems, dynamic memory allocation, cfd computational fluid dynamics: There is no problem with doing this in theory other than if you define such a large local automatic array then the stack usage will be large. On modern 32-bit or greater systems however this should not be a problem. Assuming doubles to be 8-bytes (64-bits)...

C++: Launching EXE and Random No, pseudorandom number generators, david spector
pseudorandom number generators, david spector, createprocess: johntim , Thank you for your question. 1. To launch an EXE, use the CreateProcess or ShellExecute functions. 2. There are many different kinds of pseudorandom number generators. It is impossible to generate a truly random number by a computer (unless...

C++: Learning C++ for ME, dietel and dietel, two dimensional array
dietel and dietel, two dimensional array, sales slips: Thank you for pointing out your circumstances. However as you state what specific help you require to just set you on your way I would probably have provided assistance even if I thought it were coursework or homework. Most such requests just re-post their...

C++: Learning Curve, c programming basics, allegro library
c programming basics, allegro library, midi sound: Hello, As it turns out, I have a degree in game design so hopefully I ll be able to clear a lotof this up for you. 1. Alot of games use either DirectX or OpenGL. Most use DirectInput from DirectX because it actually queries the hardware. DirectShow...

C++: Learning MFC, visual c help, david spector
visual c help, david spector, mouse input: KalluMama, Thank you for your question. In order to learn MFC, you should write programs. It doesn t matter what they do, just make something up. Make a program that accepts mouse input and shows the result in a window and can save and read such images....

C++: Lib files and linking!?, unresolved external symbol, lib files
unresolved external symbol, lib files, server dll: Please relax. Be calm. 1. You have to be clear about the dependencies of your executables. Why are there cross dependencies? Have you added these dependencies - are they intentional or accidental? 2. You re looking at the wrong documentation - dont...

C++: Linked Lists, scalar type, class default
scalar type, class default, linked lists: Ok this is the line where you made the (reasonable) mistake: List grocery(); You might think that this creates a List object called grocery initialised using the List class default constructor. Unfortunately this is not the case. One of the most...

C++: Linking Customized Help Files, david spector, help file
david spector, help file, problem thanks: Aarron, Thank you for your question. My guess is that you can do what you want to do. I cannot give you any specifics because I do not know what your Help file does. You refer to the filter within the help file , but this makes no sense to me. What...

C++: Linking "ifstream ins" to file "booklist2.txt", const int size, project folder
const int size, project folder, project settings: FOLLOWUP: --------------------------------------------------------------------------------- It occurred to me that I missed a few things you could do with regard to locating your data file: 1/ Look into the debug or debugger settings for your project...

C++: Linking, macro expansions, lnk2005
macro expansions, lnk2005, translation unit: There are two similar terms used in C and C++ (and probably many other programming language descriptions): declare and define. You can declare a thing as many times as you like in C and C++. All this says is that somewhere there is a definition of such...

C++: Listing Files in a folder, ms win32, win32 systems
ms win32, win32 systems, sdk functions: First I am sorry for not getting back to you sooner. I have been unexpectedly away from home for a few days and have only just now got access to the internet. There is no standard way to iterate through a folder (or directory) in C and C++. You have to...

C++: Lists with pointers, last element, null pointer
last element, null pointer, new element: Ah! The joys of linked lists! First the list does _not_ contain the values - it contains lists elements which contain the values together with the housekeeping information to maintain the list - in this case the next element pointer. The list contains...

C++: LNK2001 - unresolved external symbol, error lnk2001 unresolved external symbol, unresolved external symbol
error lnk2001 unresolved external symbol, unresolved external symbol, david spector: Tom Hicks , Thank you for your question. This is an error caused by a program reference that was not satisfied by any object file in the list of files being linked. For example, suppose I write the code void ABC(); ABC(); There will be no compilation...

C++: For Loop, code snippet, right direction
code snippet, right direction: Hello, The following code snippet should help you out and get you pointing in the right direction: // in main int main() { int iSum = 0, i; for(i = 0; i = 10; i++) iSum += i; return 0; } It sums up all the numbers from 1 to 10 in the...

C++: Loop, pencil and paper, digit numbers
pencil and paper, digit numbers, algorithm: Well I only had a quick look but it seems to me that your implementation of the algorithm is incorrect, and in fact more complex than your description and example imply. I think in your loop you should substitute for x and y as follows: Next x = y and...

C++: For Loop, variable sum, int sum
variable sum, int sum, sum sum: Katrina, Fortunately the answer to your question is pretty easy. Since you know how to write the loop to print out the numbers, you have already done the hard part. I m going to assume your loop looks something like this (without dealing with the + sign):...

C++: Low Level Mouse Hook and DLL, david spector, hook procedure
david spector, hook procedure, int ncode: Steve, Thank you for your question. If you are saving global information (such as a hook handle), be sure to save it in such a way that callers can access it from any process. In general, a hook procedure is executed in the context (address space) of the...

C++: language, david spector, refernce
david spector, refernce, computer experience: notis , Thank you for your question. There is no way to predict whether learning anything will be easy or hard for a specific person. I do not know you, your abilities, or your previous computer experience. I cannot recommend a book. I suggest you visit...

C++: learing, knowledge book, tutorials c
knowledge book, tutorials c, c tutorials: Jon, There are so many books out there on C and C++ that I honestly don t know which ones are the best. All I can raelly say is stay away from the C (or C++ in 24 Hours books. Those ones just suck. I d recommend when you re at the bookstore, grab a few books...

C++: linked list, c standard library, david spector
c standard library, david spector, correct algorithm: Eddie, Thank you for your question. No one should use the bubble sort. It is the least efficient of all sorting methods, and is not even the shortest algorithm. It is also arguably not the simplest to understand. Excellent tutorials on sorting algorithms...

C++: linked lists in data structures in Dev C++., precise specification, list library
precise specification, list library, class declaration: Hello, thankyou for your question. Well you didnt specify a single word what you want me to do in it. If you want to know what the teacher has asked, the he has given you the outline of the Link List class and you have to implement it and insert the...

C++: linked lists & file handling, ivalue, pfile
ivalue, pfile, linked lists: Hello, I would start by making a temporary linked list that holds the node values you read from a file. while(!feof(pFile)) { Node* pNode = new Node; fscanf( %d , &pNode- iValue); list.push_back(pNode); } After that completes, you can memcpy...

C++: linking error, c standard library, ascii value
c standard library, ascii value, ansi standard: Hello again, This isn t ANSI standard C++. Your main should return an int(0), and clrscr() as far as I know isn t a C standard library function. Most people use: system( clr ) I believe it is. Another problem is that your while loop is looping an undefined...

C++: linking libraries, interactive development environment, david spector
interactive development environment, david spector, lib files: Greg , Thank you for your question. Linking to a .lib file is done by the linker, not the C++ compiler. Most compilers come with a linker. When you build a project from an Interactive Development Environment, the environment will maintain information associated...

C++: linking, ms windows programs, component object model
ms windows programs, component object model, automation interface: The answer is that in general C++ would be as good as Delphi for this sort of thing. It is not so much the language that is at the heart of what you wish to do but the facilities presented to you by these other programs. As you are talking about MS Windows...

C++: listing a directory, c runtime library, google search
c runtime library, google search, native win32: The quick answer is that there is no standard C++ or C way to work with file system directories (or folders if you prefer). To find out what items are in a directory you have to use operating specific functions. So you have to look at what the Win32 API...

C++: Where's my logic gone wrong?, ralph hope, logic error
ralph hope, logic error, hardcore programming: No, I ll help you. Even if you were a student and this is homework you have at least got some code and got it running and working to some extent. That is more than most such student questioners do. They usually just send me their assignment question verbatim...

C++: Which loop is the better?, exact same thing, explaination
exact same thing, explaination, desired results: Hello Jai, thank you for the question. Both of those loops do the exact same thing, in the exact same time O(n). Another way to do that would be the following: int i = 0; while(i 100) { printf( Hello ); ++i; } But all of these are of the same...

C++: For loop for devc++, initial expression, namespace std
initial expression, namespace std, using namespace: First I am wondering why you are using global variables rather than local variables. In a small program such as this it does not really matter, but global data causes problems in larger systems, so it is good to get into the habit of _not_ using it when not...

C++: do while loops, david spector, logical truth
david spector, logical truth, visual studio: Josh , Thank you for your question. Unfortunately, you have not given enough information for me to be able to answer your question. Please resubmit your question with more details or a clearer description and I will do my best to answer. Yes, you may...

C++: lynux, gnu c compiler, man gcc
gnu c compiler, man gcc, gcc options: Well I assume you mean that your operating system is Linux _not_ Lynux. Your first mistake is using cpp as the program to compile your C++ code. Maybe you assumed that the extension indicates the name of the program used to compile your code - whatever,...

C++: Macro Expension, integrated development environment, gnu compilers
integrated development environment, gnu compilers, conditional compilation: Yes I can. In fact I had to do just the same thing recently. Look at the options for your compiler. If you are lucky there will be one to allow the output of the pre-processed source file - that is with all files included, all conditional compilation sections...

C++: Mail Prcocessor problem, c programming language, david spector
c programming language, david spector, application accesses: vivek , Thank you for your question. This does not appear to be a question about the C++ programming language. Perhaps you made a mistake in selecting the question topic area. Please feel free to submit questions specifically about the C++ programming...

C++: Making Prank Programs for C++ Practice, visual c 6, david spector
visual c 6, david spector, prank programs: Jase, Thank you for your question. The desktop is actually displayed in a window, and you can get a handle to that window by calling the GetDesktopWindow function. You can get a Device Context by calling the GetDC function. You can then call any GDI functions,...

C++: Mapping in C++, random network, memory space
random network, memory space, receiving the message: Your question seemed a bit garbled - several bits were repeated at random points in the questions as if you had trouble with copy and paste viz: I ve got a difficult question and I hope you know an answer or at least where to have a look at. This is...

C++: Measuring experience, language syntax, data manipulation
language syntax, data manipulation, logical skills: Hi Frans, This is a tricky one, yet it s one we all wonder about from time to time. There are several ways you might gauge your experience, both officially and personally. Official measurements include grades in classes and standardized tests. There...

C++: Memory de-allocation, array of pointers, object constructor
array of pointers, object constructor, dimensional array: There are two forms of new and delete - scalar and array. When deleting the individual cells of your pointer arrays you are using array delete, however they were allocated using scalar new thus: myCellGrid[i][j] = new Cell(this, ,j); (note:...

C++: Memory Leak with vectors, int y3, int x3
int y3, int x3, typedef struct: pixa=*(image+ xpos + (LineLength * (ypos))); Hi one more question. Here you are passing image as a pointer. Are you adding the adress of image here in the above expression. Also, I am not sure about method clear? You should use erase to remove data from the...

C++: Memory Leak, memory leaks, memory consumption
memory leaks, memory consumption, program crash: Hi Sofia Unintentional memory consumption by a computer program where the program fails to release memory when no longer needed. Suppose you have allocated some memory using new(in C++) or malloc/calloc (in C) and you have not deallocated the memory...

C++: Memory leak, memory leaks, java virtual machine jvm
memory leaks, java virtual machine jvm, common language runtime: I do not think memory leaks are restricted to OOP. They are not confined to OOP, any style of programming can have memory leaks. A lot of OOP is concerned with concepts rather than low level details. It is at the low level details of specific languages and...

C++: Memory Management, dynamic memory allocation, c implementations
dynamic memory allocation, c implementations, command line option: Your question may not help with what you want. As to whether you can see the code generated by your compiler - that depends on the compiler you are using. The same goes as to how you would instruct the compiler do this. Note that telling me you are using...

C++: MFC App wizard dialog bar problem, visual c 6, wizard dialog
visual c 6, wizard dialog, mfc application: I don t quite understand what you mean. Usually when you develope your application, you can enable/disable a control. Also inside your program (when you are initializing your dialog box), you can enable/disable the corresponding controls. If this doesn t...

C++: MFC SetForegroundWindow() (TOPMOST), mfc framework, hello eddie
mfc framework, hello eddie, getfocus: Hello Cinap, thank you for the question. One of my friends ran into this problem a while back, and I remember that it was a real pain. He kept a hierarchy a structures that contain a pointer to a CWnd and a integer representing the object s current age....

C++: MFC without Visual C++?, microsoft foundation classes, free c compiler
microsoft foundation classes, free c compiler, mfc programs: Diamind, As you probably know, MFC stands for Microsoft Foundation Classes. These classes are for Windows programming. While you don t *need* to have these files, it would be helpful to have them (as says a buddy of mine who knows more than I do). If you...

C++: MFC, david spector, visual studio 6
david spector, visual studio 6, syntax line: charly , Thank you for your question. If by package you mean a way to build your project from source files, you can export a project by creating a makefile . This is described in the Visual C++ MSDN Library: -----Start of Quotation----- There are...

C++: Microsoft Visual C++, gnu gcc compiler, microsoft visual c
gnu gcc compiler, microsoft visual c, exe compiler: See examples of cygwin makefiles: http://techweb.rfa.org/pipermail/portaudio/2001-June/000030.html and http://home.hetnet.nl/~lcbokkers/simsock.htm I search cygwin makefile on google, and these are some relevant results. I hope this helps. You can...

C++: Minimize to system tray, wparam, lparam
wparam, lparam, open applications: Hello Gareth, thank you for the question. In your WndProc function, you can set up to catch you WM_SIZE event. This is sent when the window is resized. There you can use your wparam and lparam variables passed into the function. These represent the window...

C++: Minimum spanning tree, minimum spanning tree, shabah
minimum spanning tree, shabah, pointers: Assuming that you are already familiar with this algorithm, you would know that it need considerable time to do this coding. I ll be ahppy to further help you, if you like to do the coding yourself. Otherwise, let me know to get someone help you with coding...

C++: MODEM INPUT, david spector, speech sdk
david spector, speech sdk, internetopenurl: rasheed, Full details on Microsoft TAPI are contained in Microsoft s MSDN Library. You can search the MSDN Library at http://search.microsoft.com/us/dev/default.asp. I regret that, since I have never used TAPI myself, I cannot offer any specific advice....

C++: "Modal" Windows?, david spector, windows longhorn
david spector, windows longhorn, modal windows: AJ, Thank you for your question. Unfortunately, you did not state your Operating System, which might be Linux, Sun OS, Windows 3.x, Windows 9x/ME, Windows NT/2000, Windows XP, Windows Longhorn, MSDOS, MacOS, etc. If you are using Windows, and not using...

C++: Moving Shapes, borland builder, getasynckeystate
borland builder, getasynckeystate, button event: Hello Alun, As opposed to Java, in C++ there is not default event handler for key presses. The function GetAsyncKeyState takes in a virtual key code and returns a value when the button is pressed. It is then up to the programmer to handle what needs to...

C++: Multiplication Table, going buggy, multiplication table
going buggy, multiplication table, endl: First sorry for not getting back to you sooner. I have been unexpectedly away from home for a few days and have only just now got access to the internet. I am going to help with your immediate problem, that of defining the array mt. I am _not_ going to...

C++: MVS, microsoft visual studio, straight c
microsoft visual studio, straight c, game program: First let me say that this is _not_ a C++ question. It is a product support question. Lucky for you I actually use the product in question... You do not say which MS VS version you have, so I will presume it is the current version - the .NET 2003 edition....

C++: mac sit, c programming language, david spector
c programming language, david spector, windows operating system: Rick , Thank you for your question. This does not appear to be a question about the C++ programming language. Please feel free to submit questions specifically about the C++ programming language to me at any time. I suggest that you post this question...

C++: macro expansion, visual c 6, macro expansion
visual c 6, macro expansion, cem: Hello Cem, thank you for the question. I m not sure what you mean by that produces precompiled source code file where macros are expanded. From the sample code you have shown, it looks like what the compiler already does. A #define is nothing more...

C++: magic matrix code, david spector, magic matrix
david spector, magic matrix, homework questions: faisal , Thank you for your question. Is this homework? It is against my policy to do homework questions. I can help you with work that you have already done, but I cannot give you full answers. Please attempt to do part of the work, and then ask...

C++: main() function !, premnath, void foo
premnath, void foo, quires: Hi dear Chandana ! Its not much essential that main() function to be the starting of the program , perhaps you can define any number of functions just like this ! void foo() { /* some definitions */ } void foo2() { /* some definitions */ }...

C++: making a "beep" sound, carriage return character, beep sound
carriage return character, beep sound, command shells: Well I cannot say for sure why your program does not do what you wish. I have just tried a similar program on my SuSE Linux box - running in a terminal session under the GNOME desktop and it worked fine for me so I can only suggest that it is your system setup...

C++: making a membership software in Un*x, sudo command, membership software
sudo command, membership software, software ftp: James, If users need access to your server and test the software, ftp account won t suffice. To accomodate following spec, you need to modify the telnetd and/or rlogind (if possible) and use it on your server(s): You do not need to create so many...

C++: mastermind game, mastermind game, bruce eckel
mastermind game, bruce eckel, time and patience: 1. you have missed semicolons 2. your & should be replaced by && for(j=1;j =4;j++) a[j]=random(10); for(int attempt=0;attempt 10;attempt++) { for(j=0;j 4;j++) a[j]=random(10); for(i=0;i 4;i++) { if (a[j]==b[i]& j!=i)...

C++: mathematical operations on a table in a for loop, volume book, ivalue
volume book, ivalue, ofstream: Hi, First of all, regarding your first line of the code: (book_table[row].volume - order) = ... The expression on the left side is not variable, so you cannot assign something to the result of the computation. You should give a variable there, for...

C++: matrix multiplication coding, matrix multiplication, loop program
matrix multiplication, loop program, twenty times: Hi Shirin Write a program that multiplies a n/n matrix with another n/n matrix and put the thing in a loop as you have said which will iterate 20 times. You can have a look at this link if you have any problem regarding multiplication of matrix. http://www.scodz.com/ViewProgram.php?uid=2&link=6...

C++: maze in c++, recursive algorithm, mazes
recursive algorithm, mazes, data structure: Hello again Masumeh, thank you for the question. There is no real way to be able to solve every single maze you could possibly be presented with ever. The algorithm I gave you was the generic way of doing it. You have to test your collision with the different...

C++: maze in c++, exit position, dear professor
exit position, dear professor, mazes: Hello masumeh, thank you for the question. The most common algorithm to finding the exit of a maze is to move in the immediate direction you can move. If you hit a wall, it doesn t matter, because it will move back out since it can move there. You write...

C++: maze, ascii images, ascii symbols
ascii images, ascii symbols, dangerous monsters: Hello mojgan, thank you for the question. This isn t too bad when you think about it. Make a char[][] that can hold the maze first off. Like this: const int width = 20; const int height = 2; char maze[width][height] = { {/*find a nice ASCII images...

C++: member init., comeau c, class aaa
comeau c, class aaa, ms vc: Unfortunately not. We do not have the correct syntax to allow this to happen as members initialised in a constructor initialiser clause are initialised using constructor initialisation syntax, as in val(0) in your example. However this syntax is not legal...

C++: About oops, motion vector, const int
motion vector, const int, object oriented programming: Hello again satish, thank you for the question. For your first question, again, I m not sure what you mean when you say object based programming. I ve never heard that term before. I m going to assume you mean structured programming a la C. OOP should...

C++: memory leaks, vector vect, memory leaks
vector vect, memory leaks, suse linux: Hello Joe, Thankyou for your question. Without seeing your code it is really hard for me to find out the source of leaks, but thats what i can suggest to you right now But it seems obvious that one of the following two cases must happen: 1. That...

C++: memory leaks, memory leaks, structure objects
memory leaks, structure objects, global header: Hello Joe, thanks for the question. From what you ve said, I came across a couple of things that could be the cause. As you state that your vector and structures are local and give back their memory. If the vector has had any object pushed onto it which...

C++: Wow..Thankyou so much,..., visual cpp, cpp compiler
visual cpp, cpp compiler, sparc solaris: First let me explain what ISO standard C++ is. It is a document published in 1998. It does not compile anything. It just states what an ISO standard C++ conforming compiler and library should do and contain. It also has bugs (and they have fixes – the updated...

C++: What is method Overriding in OOPs, fun2, method overriding
fun2, method overriding, desai: hi Kedar Suppose you have three functions in ur base class (B) called fun1(); fun2(); and fun3(); you derive a class called (D) form this base class (B) now D has got all the functions of B now if u redefine the function fun3() again in the derived...

C++: What is method Overriding in OOPs, method overriding, advantage and disadvantage
method overriding, advantage and disadvantage, allexperts: Overriding means a derived class member overrides the behavior of the base class. So it is applicable to polymorphism i.e. overriding is applicable when the base class function (that is overriden in the derived class) is virtual. If the base class function()...

C++: mfc and generally, project graphics, endline
project graphics, endline, onpaint: Charly , Thank you for your question. 1. The flashing can be caused by erasing the window before it is repainted. See if you can suppress the erasing. If you are using MFC, look for OnPaint or OnDraw functions. If you call InvalidateRect or something similar,...

C++: You might know the microsoft technology 'late-binding'. Is late-binding the same as polymorphism?, interface pointer, late binding
interface pointer, late binding, static binding: Thanks. Hope your new year is going well also. This question has little to do with C++. If you mean binding with respect to COM then the COM glossary has this to say on the subject: Binding Associating a name with its referent....

C++: min of 4 values, reply thanks, trues
reply thanks, trues, fraction: Well the problem you both have is using else at all. In an if {...} else if {...} else if {...} else {...} construct only _one_ clause will ever be executed but you may need to execute more than one clause to determine the minimum of four values. For example...

C++: minimum of 4 values, conditional statement, x2
conditional statement, x2, bottom line: Hello epic, thank you for the question. Your problem if the fact that you are not using else if s in your conditional statement. The execution flow is not working how you think it is. Here is what it should look like (note AllExpert s lack of indentation...

C++: monitoring events in Windows, david spector, c programming language
david spector, c programming language, best bet: Matt , Thank you for your question. You mention Windows and Linux without making it clear which system you want your solution to work on. Monitoring events is completely different in the two systems. In either case, if I were solving this problem I would...

C++: motherboard serialnumber, winmgmts, wmi
winmgmts, wmi, technical document: Dear Ankit, I would make this program for you in a day or two. Can you clearly specify me the functionality of the program you want to make, so that i can provide you with the complete source code of this question and the technical document to understand....

C++: mouse emulation in C++, visual c 6, david spector
visual c 6, david spector, microsoft visual c: emad, Thank you for your question. Although you can send any of the mouse messages directly to any window using the PostMessage function, you probably want to generate a system-level mouse event. You can do this using the SendInput function. You can...

C++: mpg, math problem, miles per gallon
math problem, miles per gallon, vacation trip: Hello Jonathan, thanks for the question. Programming this is no different from the math problem solution. It s the same forumla and everything. Hopefully this code sample should have you pointing in the right direction: #include iostream using namespace...

C++: multiplayer card game, graphical user interface, internal data structures
graphical user interface, internal data structures, paint message: Al, Thank you for your question. I would represent the data in two parallel ways: in the Graphical User Interface, which would display the cards and piles on the screen upon receipt of a Windows WM_PAINT message and after any user action, and internal data...

C++: in multiple inheritence at second level of hierarchy i could nt able to access base class memeber attribute., multiple inheritence, int sum
multiple inheritence, int sum, j class: Hello sadasivam, thank you for the question. Yeah, you can t do that. This is why inheritence usually stops after the first level of inheritence. Remember, the third level derived object does not know that it has a grandparent class. That s the reason...

C++: multiply big numbers, ascii unicode, visual c 6
ascii unicode, visual c 6, multiplication method: John, There is no built-in datatype to represent large numbers. Therefore, C++ has no simple way to do it. You have to treat this as you would any programming task: design the data layout and the processing necessary to compute the result. In this case,...

C++: what must it do to make validation to the input here, bool c, op1
bool c, op1, math error: You are reading the values as doubles. If you enter a double value in a format that is not supported then you should get a stream failure, that is std::cim.fail() will return true. A stream failure indicates a non-fatal error, usually a formatting error as...

C++: Why must variables be declared before it is used, but not methods?, class member functions, external linkage
class member functions, external linkage, compilation unit: Wrong. In C++ functions and variables have to be declared before use. They need not be defined however. In C++ you can declare something as many times as you like but you can only define it once (the one definition rule). In C for functions first use (call)...

C++: Need advice for C++ programmer career, c standard library, stony brook university
c standard library, stony brook university, nicolai m josuttis: First in many ways the languages you code in are not all that important. Of course you need to know what you can and cannot do in various languages, but behind the language are the ideas - the analysis and design of the software. Anyhow if you wish to add...

C++: Need HELP, n1 n2, dx dy
n1 n2, dx dy, gm c: Hi I am sorry for delaying your answer! But, I have devC++ compiler! Which does not support graphics.com. I have to get another compiler. I will reply to you as soon as possible Hi can you do the assignment outside the if statement and check once more...

C++: Need Help with Bidimensioanl arrays, string str, arrays
string str, arrays, vector: Hi, Row = ROW and Column = COL [1] char ** x = NULL; x = (char **) malloc (ROW * sizeof (char *)); for (int i=0; i COL; ++i) x[i] = (char *) malloc (COL *sizeof (char)); [2] string str; vector string Arr_of_string; ...

C++: Need help coding this algorithm, bruce eckel, column elements
bruce eckel, column elements, row numbers: It seems you have to convert some code from Matlab into C++. Please spend some time in learning the language - it will be an easy conversion then. You can start by looking at Bruce Eckel s book Thinking in C++ which has both online and print versions. However,...

C++: Need of private constrctor and destructor?, singleton instance, singleton object
singleton instance, singleton object, private constructor: Hello john, thank you for the question. There is no concept of making any method or variable private in a cpp file (there is a way to fake it with static). You would make your constructor and destructor private in your class declaration, in the header....

C++: Nested Structures, david spector, nfl owner
david spector, nfl owner, team nfl: Shirley Valencia , Thank you for your question. The problem may be in statements like file_in.getline(NFL.play.league, 5, ); This statement will read in text from the input file, stopping at the first space character. If your data contains space...

C++: .Net Programing, extenstions, new solution
extenstions, new solution, source files: Hello John, thank you for the question. This isn t so bad. The way I do it is to: Open the compiler. Create a new solution with ctrl+shift+n This spawns a project automatically. Add source files to the project. Right click on the solution...

C++: Networking in C++, networking book, introduction material
networking book, introduction material, socket programming: As you are using two different platforms, I suggest you to start with plain socket programming. The corresponding library is available in both platforms. There are plenty of socket programming books available that you can read. For instance, COMER has a Networking...

C++: New, programming problem, step2
programming problem, step2, variables: Hi ngee to solve a C++ or any kind of programming problem you have to go step by step #include iostream.h char func(void); //the function used in the program is declared here void main() //step1: usual syntax void main { //step7: variable to...

C++: New to c++,, using namespace std, extern void
using namespace std, extern void, learning c: Hi, Please do not use iostream.h . Use iostream and then put using namespace std . As you know that cout,cin etc are declared and defined in that namespace. Namespace concept in C++ (or any other langauge like package in Java and Perl) make us safe in...

C++: New, and confused, namespace std, using namespace
namespace std, using namespace, c statements: hi! Actually iostream.h ans clrscr() works with the old c++ compilers. They were extensively used with C like programming.ususlly suppoted by Turbo C 3.0 etc and the new complilers like Borland5.0 ( although it is qiute old version now ) doesnot support...

C++: New, and confused,, run time library, std namespace
run time library, std namespace, google search: samantha , Thank you for your question. C++ was designed by a committee. This in itself is not necessarily a problem, but there were several versions of C++ in actual use while it was designed. There are several decisions that the Standards committee made...

C++: Is the NULL a value in C/C++ ?, null pointer value, pointer type
null pointer value, pointer type, void pointer: Yes. Assuming that your purpose is to return a pointer and that pointer has a null pointer value. In this case the result would be the same, an error. NULL and zero are not the same as no returned value at all, which is what is meant by a void return value...

C++: Numerical Programmer, numerical analysis techniques, solution schemes
numerical analysis techniques, solution schemes, solution scheme: Stephan, One of my friends just came up with a small bit of information: the classical solution scheme is more of a recursive style of approaching things. The iterative solution is exactly what it sounds like: going step by step. I m not sure how much this...

C++: Numerical programmer, numerical analysis techniques, solution schemes
numerical analysis techniques, solution schemes, programmer job: Dear Stephen, Thankyou for your question. I apologize for the delay, because i was out on vacation s and the status at AllExperts.com didn t show me. Well, Stephen, Numerical Programmer job means that you should be having the qualifications in the following...

C++: namespace scope, class functions, clashes
class functions, clashes, scope: Hi, Namespace was introduced to get rid of name clashes for class, functions, variables etc. Anything belonging to a name space xx can be referred to as xx:: name I am not sure why you are comparing a class and a namespace. Regards, Rai...

C++: need c++ program to give exam, mathematical computations, bruce eckel
mathematical computations, bruce eckel, thinking in c: It seem you have to write a simple C++ program using std input and output. Here are some examples of such code: http://www.thescripts.com/forum/thread674270.html You can use math.h for mathematical computations. For learning C++, one good reference...

C++: I need help about the arrays, dangerous monsters, dear professor
dangerous monsters, dear professor, learning c: Hello mojgan: I hope u ll be fine. Pardon me, but ur problem statement is not very clear to me. Like it doesn t tell me: 1) What do u exactly mean by program must take us from one place to the end. (another place) Are you required to...

C++: i need help, david spector, homework questions
david spector, homework questions: brent summers , Thank you for your question. Is this homework? It is against my policy to do homework questions. I can help you with work that you have already done, but I cannot give you full answers. Please attempt to do part of the work, and then...

C++: I need to make a program using rand(), unix ftp, int choice
unix ftp, int choice, int num: Hello, This problem is actually a simple one. The following code should help you out some and get you on track: // in main int main() { int num = rand(); int choice; while(true) { cout Enter the number: ; cin choice; if(choice ==...

C++: negitive restrictions, lemonade stand game, mr onion
lemonade stand game, mr onion, psuedo code: Hello Mr. Onion, thank you for the question. There are a couple of ways you can do this. You could just turn the negative number positive, or you can keep looping until they enter a non-negative number. Here is some psuedo-code: // in main // Turn...

C++: about nested loops and if statement, initial condition, question paper
initial condition, question paper, loop 2: Dear Sunny, Thankyou for your question. I apologize for the delay, because i was out for some days, and the status didn t show me on vacation. Well nested loops is somewhat concept related to the normal loops like there are three 1- For Loop 2-...

C++: How to make a non-cmd prompt window?, windowed application, microsoft visual c
windowed application, microsoft visual c, visual c 2005 express edition: Hello Gregory, thank you for the question. In order to make a windowed application, you have to tell Visual Studio to generate a Windows application instead of a console application when you create the project. Then you will have an empty windowed application....

C++: I/O, watcom compiler, std namespace
watcom compiler, std namespace, infile: I suggest you try: infile.seekg(0, std::ios::beg); I am assuming ISO standard C++ IOStreams and not any form of pre-standard IOStreams (sometimes called traditional IOStreams) - that is you included the standard header fstream (note: no .h extension)...

C++: I/O text file, ofstream, question area
ofstream, question area, default mode: You do not say how you are currently trying to open you files. However as you are asking a C++ expert in the C++ question area I shall concentrate more on C++ IOStreams. The problem (for C or C++ file I/O) is that you are opening the file for writing with...

C++: Object References in C++, circular reference, global object
circular reference, global object, object functions: Dave, Include files are for just for the convenience of the programmer. They are processed only by the C Preprocessor; the C++ compiler simply sees their content, in order of inclusion. You are free to use them as you wish. Typical programming convention...

C++: OLE DB Connectivity in C++, david spector, db connectivity
david spector, db connectivity, msdn library: Joshua, Thank you for your question. Unfortunately, I have not done DB programming using Visual C++, so I can t help. I suggest that you post this question at www.experts-exchange.com, which is more advanced than allexperts.com. Also, you can search...

C++: OOOPS!, integrated development environment, science text book
integrated development environment, science text book, roberta allen: Note that you can use upper case where grammar and usage dictate – such as at the start of a sentence for example! As an aside someone once mentioned that upper case is in fact slightly more difficult to read – I presume they meant reading in quantity not...

C++: OOP, command line argument, stream object
command line argument, stream object, argc: Dear Rikin! 1. In the first statement , ifstream is a class where as infile is an object associated with ifstream class( it will invoke the constructor for ifstream class in order to open a file in input mode !) so the statement should be used like this....

C++: OOP, stream object, ios
stream object, ios, current position: Dear Rikin! There are two member functions to move the file pointer to the desired location in a file seekg(offset , refposition); seekp(offset , refposition); The parameter offset refer to the number of bytes th file pointer to be moved from the position...

C++: OOPs Concepts, inheritance polymorphism, object oriented system
inheritance polymorphism, object oriented system, visual basic: In an object based system ,we can use the objects to accomplish our task and we cannot implement the special features of the oops ( say inheritance , polymorphism and so on..) Eg : Visual Basic is a pure object based language , it allow one to use...

C++: OOPs, oriented programming language, object oriented language
oriented programming language, object oriented language, system downtime: C++ Is not a pure object Oriented language ! 1.Classes may be created or modified during runtime, a feature that C++ does not support. 2.Some programming situations demand runtime creation of new classes: 1. If a large number of different classes...

C++: Opengl C++ in Linux - Animation/evolve not working, golftest, class variables
golftest, class variables, pinx: I am not an expert in OpenGL but it seems to me from a quick look at your code that you have two versions of an object called gball that are separate objects: 1/ The global gball defined here: //initiate gball golf gball = golf(0,0,0); And...

C++: Overloading the 'new' operator for arrays., external linkage, default constructor
external linkage, default constructor, syntactic sugar: Sorry, but creating built-in arrays of objects – be they automatically allocated (locally on the stack), statically allocated (locally or globally with internal or external linkage) or dynamically allocated (using operator new []) - always and only ever call...

C++: object and instance?, bmw m5, bmw cars
bmw m5, bmw cars, class cars: Dear lzzzz ! The term object means a combination of data and logic that represent some real world entity , eg: Consider BMW cars . The BMW can be represented in a computer program as an object , in which the data part of the BMW object...

C++: objects/structure, member variables, compound data
member variables, compound data, backward compatibility: You are correct in a way. In fact it is probably better to loose struct than class as class is a better description of what you usually end up defining in C++. However C++ has always maintained strong compatibility with C and struct types were inherited...

C++: only 2 questions, ms windows platforms, c header file
ms windows platforms, c header file, public animal: First off, did you try to compile the code? Any mistakes in the use of the language would be picked up by the compiler - at least to the extent of the compiler s compliance with the ANSI/ISO C++ standard - some are better than others. In any case no matter...

C++: about oops, definition of encapsulation, encapsulated data
definition of encapsulation, encapsulated data, implicit function: Hello, rajesh kushwaha. Thank you for the question. In regards to programming, data encapsulation refers to the ability to hide data in a program by means of indirect accessors and mutators to it. Declaring data members public would not be data encapsulation...

C++: How to open a word document, david spector, reply asap
david spector, reply asap, word document: R PRABAKAR, Thank you for your question. Unfortunately, you have not given enough information for me to be able to answer your question. Please resubmit your question with more details or a clearer description and I will do my best to answer. David Spector...

C++: opening excel and creating a graph with c++, microsoft developer network, creating a graph
microsoft developer network, creating a graph, automation interface: I am sorry but I am confused. Your question’s subject: opening excel and creating a graph with c++ Implies that you are _only_ interested in using Excel to plot a graph. Your question however ends up asking: is there another simple way...

C++: operator overloading, c sizeof, erroneous results
c sizeof, erroneous results, ternary operator: Well, as there are only 6 operators listed that you cannot overload it seems not to difficult a task to remember them. Also you will find that you probably do not want to overload these operators anyway so I doubt it will be much of an issue. Oh, and...

C++: output incorrect, please help, default constructor, rational class
default constructor, rational class, rational public: Hi, I came through the program and have some questions. Please, do answer it so that I can proceed further. In Rational::input function you have used a charcter c as a local variable and you are not using any where? In function askType, you have declared...

C++: How to output read info., different shapes, output operator
different shapes, output operator, operator function: 1. No, when you define a function as istream& operator (istream &s, shape *shp), shp cannot be changed inside. If you want to do that, define it as: shape*&shp 2. Yes. You can also use cout s and then define the operator overloading function as: ostream&...

C++: Parallel Port, parallel printer port, server operating systems
parallel printer port, server operating systems, unix and linux: The answer depends on what you mean by a parallel port and what operating system (if any) you are using. If you mean a device such as a parallel printer port on PC systems then you will often find they can be opened like files, using the (system specific)...

C++: Parking Garage computations, control variables, homework assignment
control variables, homework assignment, descriptive comments: #include stdio.h #include iostream #include string #include iostream #include iomanip using namespace std; const int CARS = 10; static int hours[CARS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; void enterHoursParked() { for(int i=0;i CARS;i++)...

C++: Passing an array of names to a function, array of pointers, diff format
array of pointers, diff format, personal preference: Hello again Cruiser, thanks for the rating! To pass that array to a function, you would pass it like any other variable: family.SetName(6, names); The name of the array is a pointer already. Dereferencing the array name just gives you the first item...

C++: Passing file pointer to a constructor, amd athlon processor, 512 mb ram
amd athlon processor, 512 mb ram, power int: Hello, How about passing the valid FILE pointer to the constructor as a parameter. Once in the function body of the constructor, you can use your standard fseek, fread, fwrite functions in the constructor. I hope this information was helpful. -...

C++: Passing multidemensional array to function, seperately, arrays
seperately, arrays, cpp: Hello Alicia, thank you for the question. Passing 2d arrays into functions is a nasty process, and I don t recommend doing it by pointer. In fact, I think you have to do it by reference, because I know that you have to specify the second number due to syntactical...

C++: Please answer me sir, inum, maximum number
inum, maximum number, strcat: include cstdlib #include iostream #include string using namespace std; int main(int argc, char *argv[]) { int inum; cout enter the number ; cin inum; int iquo, irem; iquo = inum/100; irem = inum%100; char *cdipp; cdisp...

C++: Please give me answer of my Question, string manipulation c, bruce eckel
string manipulation c, bruce eckel, thinking in c: This is a straightforward application of string manipulation. I wont write the complete program. Instead I would refer you to: 1. This tutorial on string manipulation: http://www.mochima.com/tutorials/strings.html 2. Bruce Eckel s Thinking in C++ which...

C++: Please help me with vectors, c standard library, vector elements
c standard library, vector elements, single dimensional array: Yes. Do not use ++pos or pos++ - that is do not move forward from the beginning at all. Thus: std::vector int ::iterator pos( Rel.begin() ); // 1st element std::copy( Wed.begin(), Wed.end(), std::inserter(Rel, pos) ); Inserting elements at the...

C++: Pointer and Preprocessor doubts, infinite recursion, preprocessing
infinite recursion, preprocessing, preprocessor: Hello Amit, thank you for the question. 1. I think you may have not sent the first part of your question. I see no code that is pointer or reference related. 2. I myself have never seen recursive preprocessing like that before. I compiled the code myself...

C++: Pointers, const int size, endl
const int size, endl, pointers: To get a quick answer please give me more details - what is the output you get, and where do you suspect is the problem, and anything else which might help me in answering your question quickly. Another remark: your program is more C, than C++. One of the...

C++: Pointers in C++, microsoft compilers, garbage value
microsoft compilers, garbage value, pointers in c: Sorry but no you are not doing the correct thing. 1/ Header files: ---------------- #include iostream.h // old C++ header - Standard name is iostream #include conio.h // not C or C++ header, not required #include string // C++ standard...

C++: Pointers, abstract data type, pointer types
abstract data type, pointer types, pointer points: 1/ Types do not have addresses. Objects (instances of types) have addresses. To find the address of an object use the & unary operator: T a_t_instance; T * a_t_pointer( NULL ); a_t_pointer = &a_t_instance; Using the & unary...

C++: Positive value, david spector, assignment operator
david spector, assignment operator, absolute value: opeye , Thank you for your question. You may not get what you expect if you write a statement m_fnumber1 - m_fnumber2 = m_fresults; Instead, you should place the result variable on the left side of the assignment operator, like this: m_fresults...

C++: Positive value, absolute value, printf
absolute value, printf, mf: Hi, It means that you need absolute value of the result which can be obtained using abs() function in C/C++. Please see the following code: # include stdio.h # include stdlib.h int main () { int x; int y, result; scanf(...

C++: Pre & post increment, comma operator, sequence point
comma operator, sequence point, sequence points: Because what you are doing is illegal! You are modifying the value of a more than once in the expression: add = (++a)+(++a); Under the rules for expressions (section 5, paragraph 4 of the ISO C++ standard): Except where noted, the order of...

C++: Preventing user from showing Task Manager, windows task manager, application code
windows task manager, application code, message box: Hello Mohammad, thank you for the question. This is an interesting question, I ve never actually had to solve this problem before. What I would suggest is overriding the Ctrl+Alt+Delete method in application code to show this message box and see what happens....

C++: Problem with arrays, scanf, salarios
scanf, salarios, printf: Hi, Hope that this would help. Regards, RaiD int salario[SAL], cont, a; int main () { printf( Introduzca los salarios: ); for (a=0; a =4; a++){ scanf( %d , &salario[a]); } /* salario[a]*DESC; */ for (a=0; a...

C++: Problem to use international characters in TRichEdit, david spector, keyboard text
david spector, keyboard text, garbage characters: Serg Zarechanskiy , Thank you for your question. I regret that I do not have the knowledge to answer this question. Possibly the TRichEdit can contain only 8-bit characters and hence cannot contain Unicode characters. I suggest you contact Borland for...

C++: Problems with the ifstream, david spector, exact line
david spector, exact line, static member: Justin , Thank you for your question. 1. The best way to declare the ifstream file is at file (outermost, global) level. Since you have only one file which is shared between severall class objects, making it global (static) seems best. 2. I regret that...

C++: Profiling, copy constructor, pointer
copy constructor, pointer, rai: They can be helpful when you want to have the copies of the data part to which a pointer variable is pointing instead of just copying the pointer which would lead to the sharing of data part. Please read about deep-copying mechanism. Thanks, D Ra...

C++: Program for co-ordination of mouse, ms windows desktop, win32 api functions
ms windows desktop, win32 api functions, x window system: Sam? Who is Sam? I am Ralph McArdell, not Sam. I am a C++ expert however. You are not going to like my answer, and I am not sure that I do, in fact, get you, and as such I am not sure what sort of code would be of use. C++ has _no_ support for GUI...

C++: Program for co-ordination of mouse, mouse pointer, c functions
mouse pointer, c functions, programming book: I guess you are looking for event handling programming for mouse related event. I cannot explain everything here, as it takes pages and pages. If you really need to learn that kind of programming, you have to study a windows programming book. Note that this...

C++: Program to determine prime numbers, math class, int num
math class, int num, prime number: Hello moses, thank you for the question. Why you would use a class for this, I m not sure, so I didn t bother when I was figuring it out. If you want you can place this function in a singleton math class of some sort if you need to. The was a tricky one,...

C++: Program Parking, amount of money, right direction
amount of money, right direction, little bit: Hello Azahar, thank you for the question. I would be glad to help you with your project, though none of us here type your code for you. I can however, give you some example code to point you in the right direction. If you could please write me back...

C++: Program question, program question, true place
program question, true place, number string: #include iostream #include string using namespace std; using std::string; int main(int argc, char *argv[]) { string number; string compare[10] = { zero , one , two , three , four , five , six , seven , eight , nine }; cout enter the phone...

C++: Program not working, lawrenceville press, vandan
lawrenceville press, vandan, couple problems: Vandan, If I m reading this right there are a couple problems. Your random function that takes two numbers as input is fine. However, when you call this function in the main part of the program, you don t do anything with its returned value. I.E. This line...

C++: Program, david spector, homework questions
david spector, homework questions, matrices: Tibu George , Thank you for your question. Is this homework? It is against my policy to do homework questions. I can help you with work that you have already done, but I cannot give you full answers. Please attempt to do part of the work, and then...

C++: Programming, microsoft visual c, valid signature
microsoft visual c, valid signature, inch cm: C++ you say. This looks like pure C to me, not C++ - OK so a C++ compiler might compile it but it is still a C program. Now other than your dodgy layout and use of K & R brace placement - generally not used for readable code these days - your code contains...

C++: Programming.., spell checker, duplicate files
spell checker, duplicate files, programming question: I suppose you mean two files are duplicate files if they have same name and extension but are in different directories? File system handling is platform dependent and hence not a part of the language standard. Once you get back to me with what exactly you...

C++: Programming sorting algorithm, arrow int, int array
arrow int, int array, recursive selection sort: As I had typed directly on the notepad last time (sorry for that), there were a few mistakes. Please see the following code which is working fine (tested): #include iostream using namespace std; int arr[20]; int main () { int x = 10; int...

C++: Programming, inches centimeter, garbage value
inches centimeter, garbage value, inch cm: Dear Karl, Thankyou for your question. Well i ve just seen your code and first of all i would like to clarify some errors you ve made. You defied the constant cm = 2.54 * inches This statement binding is at compile time. But internally you ve declared...

C++: Projection Histograms., rendering images, renderware
rendering images, renderware, game demos: Hello Jules, Thanks for the question. Yeah, I d better take a look at that article, since I have no idea what you are referring to. We always called it rendering images . My email is: eddie@metalzonejesuscrusher.com Also, if you like, you can check...

C++: Protecting a file from beeing read ..., client server application, client side applications
client server application, client side applications, avi file: Hello, First of all, i want to know what language you are using, becase i ve worked under C Sharp. If that is a question relating Java, you can contact me. Well, in client side applications, as you have mentioned it, the code is first stored on the...

C++: Protecting a file from beeing read ..., client server application, access control lists
client server application, access control lists, byte stream: (At the time of writing - Monday 11th October 2004 - I do not know when I can post this answer to you as the AllExperts site has been returning a Server Too Busy error to me for the last three days. I have now posted an email to their support but I am not...

C++: Puesdo code, random numbers, karim
random numbers, karim, thankyou: Hello Thamim Karim, thank you for the question. When thinking about psuedo code, just think about it like you would regular code, it s really not so hard. Your psuedo code for your program would be something like this: in main obtain your array of...

C++: Pulling information from a file, bloodshed dev c, c standard library
bloodshed dev c, c standard library, ms vc: Leaving the requirement to be used in an if statement (note: _all_ keywords in C and C++ are _lowercase_) aside for one moment the basic operations that you would have to perform are: - open the file - iterate (or enumerate) through this file looking for...

C++: parse error before '<', c standard library, correct header
c standard library, correct header, void operator: Cor! At last a _real_ C++ question! Sorry, but this weekend I have add all sorts of off topic only vaguely to do with C++ questions and people wanting me to do their homework without even trying themselves! As you suspect you have not included all the...

C++: how to pass paramters from c++ program to a macro, preprocessor, globals
preprocessor, globals, c program: Hello meena, First off, lets define a macro to use an an example here. There is a couple different ways to do this. You can have the macro call a function, or you can do all the processes in the macro itself. First lets take a look at how to use a function...

C++: You passed judgement too early, devc, question text
devc, question text, question question: Sorry you feel that way. However my response was to your question, which read: Subject: C++ Question Question: Create a string containing full name & outputs each part the name separetly. Name should be First, Mid, & last name separated by each...

C++: passing values through a function, array dimensions, int global
array dimensions, int global, variable scope: Well, you have several misconceptions in the code you posted. First, it seems you have not checked out the difference between a C++ entity name - such as a type like int or an object (that is variable) such as i or global_int and literal string values such...

C++: pausing cout, metrowerks code warrior, david spector
metrowerks code warrior, david spector, resolution timer: Tord , Thank you for your question. I don t believe that the I/O system has the capability of sending or receiving I/O events slowly, however you may be able to achieve the same result in other ways. One possibility is to write a wrapper function around...

C++: percentage, exam score, exam scores
exam score, exam scores, exam grades: Hello Joanne, thanks for the question. I don t know if you formatted the code like that to make it more readable, but a lot of your syntax is off. For one thing, a variable name cannot start with a number in C++. Perhaps you were overthinking this problem...

C++: pesky core dump. pls help - string class??, sunfire v440, free software foundation
sunfire v440, free software foundation, gnu general public license: Many things could cause such dump. I suggest you to compile your program with debuging information included and try to trace your program and check when you get the error. This will help you even if there is a bug in Solaris library. However note that some...

C++: pictures, wav sound files, backgrond
wav sound files, backgrond, playsound: Hello, Yes, you sure can. Take a look at a function included in Windows.h called LoadImage(). You would pass it the absolute path to the image, or just the name of the image if its in the same directory as the program. Playing music is also easy. If...

C++: pixel output, reading a book, computer graphics
reading a book, computer graphics, activex: It is a bit hard if you want to do it under windows, as it doesn t let you directly access the display. You should either use an existing control (like a ActiveX), or DirectX. In DOS, you were able to directly access the display memory and set the bits that...

C++: please help me, pseudo code, new element
pseudo code, new element, optimum weight: Hi, 1. (a) As the height of a binary tree with n nodes is log(n) hence inserting n elements would be 1 + 1 + 1 . log (2) + n log (n-1) I am not sure if above comes to n log (n) 1 . (b) Not true, but one part of running time, other things come from...

C++: please help me, homework questions, pseudo code
homework questions, pseudo code, new element: Sam Fredrick , Thank you for your question. It is against my policy to do homework questions. I can help you with work that you have already done, but I cannot give you full answers. Please attempt to do part of the work, and then ask a specific question...

C++: ploting curve in oop(C++), oop, curve
oop, curve, commitments: Hello Xaheen First of all, i apologize for not answering early due to my official commitments. Xaheen, as your question about plotting a curve is concerned, regarding OOP, i think first of all you should do it like this 1- Make a class named curve...

C++: pointer address and object address, pointer address, object address
pointer address, object address, class foo: Sounds about right to me (although you do not have lines 7 and 8 on separate lines in the code as it arrived in my inbox – they are all 1 long line!). Remember, new allocates from the heap and _you_ are responsible for ensuring the memory is deallocated...

C++: pointers, memory location, memory locations
memory location, memory locations, memory allocation: Dear Praveen, Thankyou for your question. Well, as far as your first notation is concerned a) char a[] = my name is ; its memory location is like this 100 101 102 103 104 105 106 107 108 109 m y n a m e It would be stored...

C++: pointers, network addresses, int count
network addresses, int count, alternate names: Hello ghassan, thank you for the question. Assuming your have you h_aliases array filled out with some names to be printed to the screen, printing to the screen is the easy part. While we don t know how many items are in the array, we know when the next...

C++: pointers, null pointer value, network addresses
null pointer value, network addresses, alternate names: You do as is implied in your question - you keep looping through the h_aliases array until you reach the end - or rather while you are not at the end: while current alias not at end of h_aliases array { process current...

C++: pointers, csci, drw
csci, drw, best of luck: Hello, I would recommend visiting this site for an explanation of what a pointer is: http://www.intap.net/~drw/cpp/cpp08_01.htm As for how to use a pointer (as well as another definition of what a pointer is), I would recommend this website: http://www.csci.csusb.edu/dick/cs202/pointers.html...

C++: polynomial equations., polynomial equations, quadratic polynomial
polynomial equations, quadratic polynomial, algebra book: Please refer to some higher algebra book - Bernard & Child s book could be one of them. Also see mizar.org/fm/2001-9/pdf9-2/polyeq_1.pdf . It would be a formula, and you have to plug in values - a very short algorithm. You can use cmath to compute square...

C++: port prog. in c/c++, progg, free material
progg, free material, c tutorials: Hello, There is lots of free material out on the web that teaches you about C and C++. Just go to www.google.com and type in C++ Lessons or C++ Tutorials (or use C instead of C++ if that s what you are interested in). There are so many links out there...

C++: Is it possible to inherit classes from STL classes?, stl class, class implementation
stl class, class implementation, class templates: The answer is yes and no. Yes you can inherit from an STL class (including the basic_string class template) but most are not designed to do so. That is the STL classes are user defined classes like any other and so the language is not going to prevent you...

C++: pre & Post increment, okies, increment
okies, increment, personal website: Hi Kuldeep Firstly don t call me sir and secondly I am here to help you my friend. Okies lets diagonise your problem to you the statement should evaluate to add = 7 + 6 = 13 // right Now tell me something a is a variable is it capable of holding...

C++: how to prevent overriding of some functions in derived class, critical functionality, library base
critical functionality, library base, virtual methods: In short you cannot. Once you declare a member function is virtual any sub-class can override it - it does not matter whether it is one you wrote or one someone else wrote. [ BTW: Thanks for the example code. However it would be a good idea if...

C++: prime factor, iteration value, prime factor
iteration value, prime factor, code paths: Neither do I. I do not know what exercise 23 is about nor do I recognise the term hailstone numbers - it has some specialist meaning to you I presume. So I can only offer general advise as I do not know what you are trying to achieve. The core of your...

C++: printf() and scanf() functions !, header files in c, premnath
header files in c, premnath, saranya: Hi dear saranya ! In order to use the functions printf() and scanf() you should have to include the header file stdio.h ( stands fo standard input/output.h ) make sure header files in c will contain only the function prototypes , constants , enumerated...

C++: problem in c++ file handling, msdn library, c iostream
msdn library, c iostream, library example: My answers always assume standard C++ unless I know for certain the particular short comings of the questioner s compiler and/or standard library implementation. That is except where I mention specific compiler specific features like the _filelength example...

C++: problem in copying, c source files, text ascii
c source files, text ascii, ascii text: Source code is nothing more than text - ASCII text at that, not UNICODE or anything fancy. Try saving it from notepad with a name having a .cpp extension (assuming it is not just a header file). Alternate extensions for C++ source files are .cxx, .cc and...

C++: problem with pointer and string constant, string literals, ms vc
string literals, ms vc, literal strings: Note: you are asking this in a C++ section so I am answering assuming you are writing C++. If you are writing C then please ask an expert in the C language section. In fact it is possible neither will do what you require. String literals have type array...

C++: problem of random character, c standard library, incomplete fragments
c standard library, incomplete fragments, c implementations: In many ways. You say you are a beginner but not exactly what you have learnt already. Please note that code shown in this answer consists of incomplete fragments used for example and demonstration purposes only. They have not been tested so may contain...

C++: program, execution, memory
execution, memory: Hello Meghaldevi, thank you for the question. I m not sure what you mean by delete itself after execution . Are you referring to the memory the program allocates? The object files is creates? This is indiscernable. If you question me back again be more...

C++: program, c source code, scripting language
c source code, scripting language, source file: Hello Meghaldevi, thank you for the question. Sure you can do that. The hard part is writing the parser for the binary file code. An easy way would be to write up all your C++ source code, save it out as a binary file, and then read everything back in as...

C++: program, bubble sort, duplicate files
bubble sort, duplicate files, spell check: hi Sharmi What do you mean by replacing duplicate files ... how can you keep duplicates files in the same folder ... please lemme know in details. Auto Spell check can be applied by storing all the word in a file just like the dictionary and can check...

C++: program, david spector, input number
david spector, input number, integer division: flossist , Thank you for your question. Your code makes no sense to me. I assume that you want to convert a string representation of an integer in base a to a string representation of an integer in base b . One way to do this is to convert the...

C++: programming, ang li, music players
ang li, music players, visual c: hi ang li For creating such applications you can use Visual C# Visual Basic Visual C Visual C++ MFC etc You can install visual studio that contains support and IDE for all these languages. regards Joydeep Bhattacharya http://www.scodz.co...

C++: programming math, microsoft visual c, computer hope
microsoft visual c, computer hope, c output: Hello cyberbatt, thank you for the question. This is interesting. I just went and had this tested on both Linux and Windows, and could not produce the answer of 9 on the first operation. It should be 11, as this is a prefix operation. The --c becomes 9...

C++: programming a telnet server, answer postings, assembler languages
answer postings, assembler languages, python language: [Sorry for the delay, the AllExpert site has not been accepting answer postings for many hours] You asked a C++ expert. What answer do you expect me to give? grin Seriously, if what you know is up to the job then use that. If not - because it lack facilities...

C++: programming, turbo c, personal website
turbo c, personal website, array: Hi Qaiser Try this out #include stdio.h void main() { int arr[100], n, i; printf( No of elements: ); scanf( %d ,&n); for(i=0;i n;i++) { printf( Enter %d element: ,i+1); scanf( d ,&arr[i]); } //reverse content for(i=n-1;i =0;i--) printf(...

C++: pseudocode for evaluating polynomials, recursive algorithm, termination clause
recursive algorithm, termination clause, pseudo code: Strictly speaking this is not a C++ question. However I can see the sort of things you are doing wrong, so here are some hints. Note that I will _not_ fix you pseudo code for you - that is your job! First, where does n come from? It is not passed in and...