About Experts Sitemap - Group 8 - Page 12 2014-04-15

C++: C++ Question, public void print, bruce eckel
public void print, bruce eckel, string state: #include string #include iostream class Label { std::string name; std::string address1; std::string address2; std::string city; std::string state; std::string zip; public: void print() { std::cout Name:...

C++: C++ Question, keyboard entry, keyboard input
keyboard entry, keyboard input, file stream: As this is a C++ question I shall assume a standard C++ environment - which if you are using the likes of MS Windows will mean a console application (i.e. it runs in a console or DOS box window). The idea is to use an I/O stream of some kind. I shall assume...

C++: C++ Recursive functions, david spector, homework questions
david spector, homework questions, recursive functions: Marnus , 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++: C++ runtime error, c runtime error, windows application
c runtime error, windows application, error message: Hello Mark, thank you for the question. The error you have described is probably the most common error message in all of C++. I have no way of knowing what could have generated that. If you could post the code causing the crash or just some more information...

C++: C++ Searching algorithm, array subscripts, single dimensional array
array subscripts, single dimensional array, c array: Your basic approach is to treat the file as an array. For the problem as stated it is relatively academic whether you retain the 2 dimensionality of the data or treat it as a single dimensional dataset. The reason for this observation is that for this problem...

C++: C++ socket programming, cross platform compatibility, c socket programming
cross platform compatibility, c socket programming, visual c 6: Hello Emad, thank you for the question. Sadly, this is a problem I m facing myself. Windows and Linux are not very similar internally at all. The networking code on each OS is different. What I ve found handy is to use a middle ware that has already solved...

C++: C++ syntax issue, bruce eckel, c syntax
bruce eckel, c syntax, storage class: Looking at error C2501 (http://msdn2.microsoft.com/en-us/library/aa983752(vs.71).aspx) I have to ask you whether you have forward declared class A. Here you use pointer to class A, so you can do: class A; // -- note this class B { //... const A* method(const...

C++: C++ syntax question, syntax question, stack frame
syntax question, stack frame, observable difference: The first statement declares and defines an object of type Culs::logCreator called logdata initialised by passing the items named a and b (or references to them) to an appropriate constructor. If no such constructor exists or there is more than one equally...

C++: C++ template, parameter combinations, c templates
parameter combinations, c templates, dependent type: In template definitions the compiler cannot tell for sure which names are types and which are not if those names are dependent on a template parameter. These are called dependent names. The default is to assume that such names do not refer to a type. If a...

C++: C++ on Variable Creation, final variation, microsoft visual c
final variation, microsoft visual c, program duration: Maybe, and if not then not necessarily for the reasons you might think! Strictly speaking the variable exists because it is static and static variables exist for the whole of the program duration. It is first zero initialised before any other initialisation....

C++: C++ & VC++, lparam lparam, hwnd hwnd
lparam lparam, hwnd hwnd, ms windows applications: Virtual functions are part of the C++ language that provides C++ users with the object-oriented technique of polymorphism. If I have implied correctly what you mean by message mapping, then message mapping does not exist as part of C++ or the VC++ core...

C++: C++ - Virtual destructors, object pointer, class construction
object pointer, class construction, memory leak: Subbu, When you have a base and derived classes , the construction of the object of derived is in the following order: [1] Construction of base (using base class constructor) and then [2] Construction of derived (using derived class construction) ...

C++: C++/Visual C++, microsoft visual studio, microsoft environment
microsoft visual studio, microsoft environment, visual c: Hello, Visual C++ is the term for using Microsoft s IDE, Microsoft Visual Studio. There is no difference between the two. Visual C++ is just developing in the Microsoft environment. Visual Basic is better for online and web based applications. I would...

C++: C++ Void Pointer, visual c 6, pointer assignment
visual c 6, pointer assignment, void pointer: Hello Sukehndu Sain, thank you for the question. This appears to be a compiler specific error. I believe that using the statement like this: ((int*)ptrV) = &i1; would also disperse that error, as it is more than likely just Visual Studio being picky....

C++: C++ vector, vector vect, vector elements
vector vect, vector elements, david spector: Sobhi , 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 of the...

C++: C++ vectors, vector vect, vector elements
vector vect, vector elements, dimensional array: Hello, The reason your vector is printing out all zeros is because that when you call createvector(), you pass it a vector by copy. The compiler internally makes a copy of the parameter and modifies the copy. All you need to do is change the function prototype...

C++: C++ versus Java, david spector, problem domain
david spector, problem domain, programming environment: Dragonel , Thank you for your question. This is like asking, which is the tastier fruit, an apple or an orange? Answer this question for me authoritatively and I will tell you which programming language is more useful. It all depends on what you mean...

C++: C++ vs C, c structures, c structure
c structures, c structure, object c: Hello Meghaladevi, thank you for the question. In C++, structures work the exact same way as classes do. They can have a constructor, a destructor and a this pointer to the invoking object. C structures function normally and cannot have an invoking object,...

C++: C++ vs Delphi, borland delphi 2005, versatile programming language
borland delphi 2005, versatile programming language, java programming language: Hello Amir, thank you for the question. I m not sure how much of an explanation I can provide you with, as I have never programmed in Delphi before. In my opinion, I think that C++ is the most versatile programming language there is. It provides flexible...

C++: C++ word validation, delimiters, c word
delimiters, c word, fread: Hello, I know the quick and easy way to do this one. Open the file with a FILE pointer. Read all the contents into a temporary char buffer with fread. Then, use a function called strtok. it takes in the buffer for the first argument and all the delimiters...

C++: C write to /dev/, servo position, servo controller
servo position, servo controller, byte values: Might I first suggest you re-read the man page for write and check the returned value and handle error returns. Then you might use something like: unsigned char message( sync ); if ( write(s- fd, &message, 1)!=1 ) { // handle error } message =...

C++: C++, max score, maximum score
max score, maximum score, test score: Michelle, Thank you for your question. I cannot get it to work tells me nothing about the problems you have found. Unfortunately, you have not given me enough information for me to be able to answer your question. Please resubmit your question with...

C++: C2071 issue, visual c 6, illegal storage
visual c 6, illegal storage, mm index: I don t think this would compile in any compiler, as the format of defining COMPILE_ASSERT is wrong. You never used the parameter e in its declaration! Also I wonder why you define typedef is that manner and inside the main function. The logic of this code...

C++: Calculating highest and lowest test scores without arrays., visualc, negative numbers
visualc, negative numbers, input data: Mark, Doing this kind of program without using arrays is a bit of a pain, but still easily done. The first thing you need to do is create two variables: grade_highest and grade_lowest. Then read in the first number, and set both grade_highest and grade_lowest...

C++: Calculator (recursion version), validation checks, expr
validation checks, expr, input string: Hello John, thank you for the question. I am glad to see you are using std::strings. These can help make your life way easier with the multiple bracketpart of your question. You should take a look at its member functions find_first_of, and find_last_of....

C++: Callback Functions, david spector, callback functions
david spector, callback functions, speech application: kashif, Thank you for your question. Your declaration OnDictationResult(PSPDICTRCGHANDLE i_handle, PSPDICTRESULTHANDLE i_result, PSPUSERDATA i_userData) appears to be incorrect because you provide no return type for the function. All functions must...

C++: Calling pivate class members functions, axis numbers, speedy reply
axis numbers, speedy reply, complier: First I have to say that your examples are not valid C++ - I expect you shortened them for the purposes of the question, but this does _not_ help me understand where you are going wrong. I also have no idea this time what the error is – last time the calling...

C++: Carbide C++ Vs Turbo C++, c compilers, premnath
c compilers, premnath, deliberate move: Dear Mr Adithya ! Choice of compiler depends on the application subject to development , and the environment it where it going to implemented ! Turbo C++ is a DOS based C++ compiler , its used to develop application based on DOS ! If you planned...

C++: IT Career without degree, computer science department, math degree
computer science department, math degree, evening job: v, Thank you for your question. I m not sure what I can say that would help your situation. I ve been out of work for almost four years, myself. I believe that you might be able to find a job doing System Administration. You will have to learn Unix and...

C++: CButtons, loop iteration, cbutton
loop iteration, cbutton, destroywindow: I suppose you have something like: for ( int i=0; i numberOfButtons; ++i ) { CButton myButton; // ... } There are several problems here. First, each time through the loop a CButton object is created...

C++: Change the color format., visual c 6, david spector
visual c 6, david spector, color pallets: sameera, Thank you for your question. Windows GDI does not support any color model other than RGB. GDI is a base technology not intended to serve all purposes. I believe you will either have to write CMYK separation functions yourself, or buy them...

C++: Changing color shceme., visual c 6, david spector
visual c 6, david spector, api library: Yasanka , Thank you for your question. Windows GDI does not support any color model other than RGB. GDI is a base technology not intended to serve all purposes. I believe you will either have to write CMYK separation functions yourself, or buy them as...

C++: Char pointer length, null character, library functions
null character, library functions, standard library: Hi, Which character you have decided to use as the end of your string would define how you write a strlen of your own. Normally, we say that is the end of the character string but you could always change this and have a | as the end character....

C++: Character manipulation question in C++, character manipulation, introduction class
character manipulation, introduction class, string data: OK the first thing to say is: Don t panic! (in large friendly letters...) The second thing is to not get it all working at once. Do it one step at a time. OK you have found how to read in a character. Can you write it out again? When you...

C++: Checking for Duplicates, c standard library, middle element
c standard library, middle element, persay: As far as I know there is no faster way if the collection is unsorted. Also, even if the collection is sorted then the best results will be obtained if the collection type has the capability for random access to existing elements - such as an array or vector....

C++: Chinese Horoscope animal recognition algorithm, recognition algorithm, chinese horoscope
recognition algorithm, chinese horoscope, scanf: Hi, You can use the mod of 12 idea. Using that, Rat = 5 Ox = 6 Tiger = 7 and so on. struct horo { char name [10]; }; struct horo myhoro[12]; int main () { int x; // here initialize the above array // Now get the input from...

C++: Class, tank class, data members
tank class, data members, parameter types: My first thought here is could you please explain which part of the answer you did not understand? OK here goes: In C++ objects are constructed. Construction allows user defined class types to define their initialisation behaviour in the light of various...

C++: Classes, pointer type, syntactic changes
pointer type, syntactic changes, class implementation: Indeed you can. In fact you can make the required syntactic changes quite easily to my example that used C++ references – return the address of the member, return type is a pointer type rather than a reference type, dereference pointer returned to access the...

C++: Classes and Member declarations !, object declaration, premnath
object declaration, premnath, member public: Dear Mr Selva! Before explaining the sequence let me explain the basic concepts in classes and member declaration that s because i found some bugs related to that ! int ivar=inum1; Consider this statement , this is of course wrong in two way...

C++: Classes, static data members, global variables
static data members, global variables, static object: From where else would you want to access or refer to objects other than for declarations and definitions. Static data members of course have to be defined somewhere outside of any function. OK so you could potentially access a data member of a global or...

C++: COM Related, david spector, c programming language
david spector, c programming language, vb application: Srini , 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 at www.experts-exchange.com, which is more advanced than allexperts.com. Feel free to ask me questions about...

C++: COMPILER, free c compiler, compiler c
free c compiler, compiler c, internet tutorials: Milos, To find some good online stuff about C++, I would first visit www.google.com, then I would type in C++ Tutorials or C++ Lessons . That s what I usually recommend for people new to the language. There are tons of links and lessons out there, so you...

C++: Compile cpp file without void main, ms windows program, microsoft compilers
ms windows program, microsoft compilers, microsoft visual c: Only one C++ implementation (.cpp) file requires a main (assuming you wish to build a standard console application). The _standard_ forms of main are: int main() { /*..*/ } Or: int main( int argc, char * argv[] ) { ...

C++: C++ compiler, borland c compiler, borland compiler
borland c compiler, borland compiler, command line tools: Hello Rayce, thanks for the question. After the download of all the Borland files are complete, there should be some sort of .exe file in the folder that will install Borland for you. It might be called Setup.exe or something of the like. When you click...

C++: Compiler Directives Removal, compiler directives, intermediate files
compiler directives, intermediate files, assembly language: Compilers usually have more than one pass through the code. The first pass usually is to do what you want. They usually have an option to let you export the intermediate files. Therefore, depending on the compilet that you use, find the way you can tell the...

C++: Compiler upgrading, borland c builder, c builder 6
borland c builder, c builder 6, david spector: Benny , Thank you for your question. I might be able to give you advice if you include some of the specific problems you have encountered when upgrading. I doubt that the Borland products are so poorly written as to be incompatible between versions. ...

C++: Compiling multiple CPPs, borland product, namespace std
borland product, namespace std, c builderx: Samuel, Sorry it has taken so long for me to answer your question; I ve been swamped these last few days. As I recall, the way I did it was by using the #include filename.extension , just like you would do with #include iostream.h (or without the .h, depending...

C++: Computer Programming Language, computer programming language, david spector
computer programming language, david spector, ms visual studio: KLY, Thank you for your question. I have been unable to find work for four years in spite of having over thirty years of experience. Very few companies are hiring programmers of any kind now, due to the poor economy. If you find work, let me know. ...

C++: Computer Programming Language, computer programming language, ms visual studio
computer programming language, ms visual studio, study cs: Hi, Currently, in programming area, there are two major camps: Java vs Microsoft tech. You could choose either of them. Its basically personal taste and I have chosen none of them. I am not able to answer the other question as I have no idea about the...

C++: Constructors of Global Object, storage duration, global objects
storage duration, global objects, translation units: This behaviour is defined in the ISO C++ standard in section 3.6.2 Initialisation of non-local objects and covers over a page. 1/ Storage for such objects are first zero-initialised. Zero initialisation and initialisation with a constant expression...

C++: Constructors, compliant compiler, c int
compliant compiler, c int, destructors: Assuming you have a standard compliant compiler then if an exception is thrown during construction of an object all fully constructed members and bases (called sub-objects) will have their destructors called. All sub-objects for which construction has not...

C++: Convert, c language program, pascal code
c language program, pascal code, pascal program: char str[100]; cin.getline(str, 100); the above reads one line of character string. then you should modify, as you wish by accessing the elements (like str[5]), and finally display: cout str; However this is not the only thing you should do. Converting...

C++: Converting char to const char?, word dogs, member functions
word dogs, member functions, pointer: Did you try to use strlen with your pointer to non-const char? If you had you would have found that the compiler would have performed the conversion for you. This is because if strlen only requires a pointer to a constant char (implying it only requires...

C++: Converting int to char*, floating point numbers, mfc libraries
floating point numbers, mfc libraries, ftoa: Hello Danesh, thank for for the question. There is a handy C function for just such a purpose. It can be found in the include file string.h . It is itoa(), which stands for integer to ascii. Here is an example: int x = 5; char *num = itoa(x); //...

C++: Converting Number into Words, inum, c program
inum, c program, 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++: Copy Constructor for inherited class, c copy constructor, overloader
c copy constructor, overloader, pcard: I am not best pleased to receive such question. The code you post is incomplete (classes Hand and GenericPlayer and all includes are missing), does not compile for various other reasons and is quite difficult to read. If you are going to post code for review...

C++: Count the number of occurrences of a word in string, c standard library, library function
c standard library, library function, learning c: Well I would say for a start that you are learning C rather than C++ - or those parts of C++ inherited from C. Secondly, if you are trying to count vowels why are you in fact counting lowercase t ? Maybe the function should be called countLowerTees or...

C++: Cplusplushelp, class excursions, random size
class excursions, random size, column id: Hi again Evagoras, Thanks very much for the translation, that really helps a lot. This may be missing the point (and tell me if it is), but why not just add an element to your excursions class titled NumberOfCustomers, or something like that, which you...

C++: Cplusplushelp, class excursions, random size
class excursions, random size, column id: I think your problem is solved using new operator. See http://www.cplusplus.com/doc/tutorial/dynamic.html . If this does not solve your problem of an arbitrary number of customers, do get back to me. When you find time, do go through Bruce Eckel s book...

C++: Creating a button control, dialog box procedure, visual c 6
dialog box procedure, visual c 6, david spector: Gil Michael, Thank you for your question. To create a button, select the menu item to add a new Resource, and choose Dialog box. Next, edit the new dialog box in the Dialog Box Editor and add a button by dragging and dropping a button from the toolbox....

C++: Creating a C Class and incorporating it into a program, syntactical problems, object oriented programming
syntactical problems, object oriented programming, visual studio 2005: Hello Bluemajic, thank you for the question. I think you are overthinking the problem. Are you having fundamental or syntactical problems with defining a class? Do you not know what to store in the class? Or do you not know how to create one in code? ...

C++: Creating a macro program to auto fill in web forms?, internet explorer activex, david spector
internet explorer activex, david spector, perfered: Programming Person , Thank you for your question. If you use C++, Windows, and Internet Explorer, you can use the Internet Explorer ActiveX Control to display the browser. You can directly control this embedded browser window from your C++ program. David...

C++: Creating office like Components, david spector, speech api
david spector, speech api, philips speech: kash, I don t think I can give you specific advice about how to build your application without knowing what it is and how your users will want to use it. Just try to make it standardized and very easy to use and you won t go wrong. Tell your customers what...

C++: c++, visual c 6, window applications
visual c 6, window applications, samarth: Hi Ahlem. I do not thing trace is possible in visual C++. Atleat I naver came across it. VC++ is basically built for window applications. The most you can have is checkpoints,but I dont think it works.Or you can insert something like cin my_var; after...

C++: c++, c compilers, command line tools
c compilers, command line tools, standard c library: In one sense this question is meaningless. C++ is a computer language and it exists as a set of requirements and the like that define it. The current definition is contained in the ISO/ANSI C++ standard - incorporating TC1 (TC means Technical Corrigenda -...

C++: c++, parallelogram, c code
parallelogram, c code, pyramid: Hello dauda gadu, thanks for the question. This is actually a very easy problem to solve. For the triangle I ll show an example: cout *** ; cout ****** ; cout ******** ; // and so on.... Console projects and cout make doing...

C++: c++, null terminator, strcat
null terminator, strcat, loop through: Hello Eddie, thanks for the question. This isn t all that hard of a task thanks to a function called strcat which resides in string.h. It appends one string to another. Lets look at how you could combine 2 strings: // in main char *one = Hello...

C++: c++, virtual destructors, inline keyword
virtual destructors, inline keyword, suitable function: Hello Sushil Sharma, thank you for the question. In C++, the only modifier you can have on a constructor is the inline keyword. Most people use virtual destructors because of inheritence, in the case of Abstract Base Classes, as to make sure that the...

C++: c++, copy constructor, assignment operator
copy constructor, assignment operator: They both copy one object to the other, but the first one copies when both objects are created, and the second one copies when you are creating the second one. In other words, the copy constructor will be called when you construct an object (by copying another...

C++: c, increment operator, c compilers
increment operator, c compilers, c macro: Almost nothing can be done in C which is not possible in C++. There are some formatting changes in C++ that doesn t let C programs compile in C++ compilers. There is a C macro that let compiler thread that code using C compiler. Do you mean ++i executes faster...

C++: c++, visual c 6, microsoft visual c
visual c 6, microsoft visual c, microsoft visual c 6: 1. you should initialize count to 1 (int count=1;), because you have already read the first number. 2. you should write count after while loop (before return comman). 3. because you have used cin.fail(), you should intrrupt the standard input to get a fail....

C++: c++, random sequence, set of numbers
random sequence, set of numbers, previous question: This is very similar to your previous question. But this time you should read number two times before you enter the loop. Also you have the same error of putting cout count endl; inside the loop. Make sure you know how to use cin.fail() because it is a...

C++: c++, array
array: That s the only way to go. Remember that you can use a for loop to reach the 10th number, or you can first read numbers in an array, and then process it. This way, even if the 10th number also occures in the second position, it will be considered, by comparing...

C++: about c, java programming language, c programming language
java programming language, c programming language, c c programming language: C++ is used for many different application types. However managed development environments such as Java and .NET are becoming popular in many areas for which C++ is used. There are still many jobs that use C++, but also many that require knowledge of Java...

C++: c++, david spector, dos installer
david spector, dos installer, windows millenium: marghachou, Thank you for your question. To display menus in DOS, you will need to control the colors of the background and text for the menu bars. You can do this using standard Escape Sequences, which are the ESC character followed by argument characters....

C++: c++, distances between places, road distances
distances between places, road distances, programming task: Hello Pooja, thank you for the question. What part of the application is giving you difficulty? You have the set of data right? Do you need to read it in from a file? Your question doesn t really specify what you are having problems with. If you take in...

C++: c++, c coding standards, bjarne stroustrup
c coding standards, bjarne stroustrup, c standard library: C++ Books and C++ Information Resources: ---------------------------------------- There are many books on C++ but not many good ones for beginners. For absolute beginners there is a book called You Can Do It - A Beginner s Introduction to Computer...

C++: c++, bloodshed dev c, dev c ide
bloodshed dev c, dev c ide, language implementations: This simple question is not as easy as you think. The most accurate answer I can provide is: From the ANSI web store at http://webstore.ansi.org. This is probably not the answer you were looking for, but it maybe. The above points you to a site that...

C++: c++, mouse pointer, mouse point
mouse pointer, mouse point, point structure: Hello gureinder, thank you for the question. For mouse movement, I am afraid I only know Windows OS specific calls. The functions SetMousePos() and GetMousePos() will get and set the position of the mouse, and ShowCursor(bool) will toggle its visibility....

C++: c, const filename, c class
const filename, c class, member function: Please read the rest of the answer from which this class (a type not a program) was an example. If you do then you will see the usage explained below where this class is introduced: The above is very basic but shows the idea. It can be used as below: ...

C++: C++, lines and circles, 2d board
lines and circles, 2d board, cell states: The obvious answer is when designing interfaces. Unlike other newer languages such as Java and C#, C++ has no interface keyword. An interface defines a set of methods that an implementer of the interface must implement. A reference (or pointer) to an instance...

C++: c++, dynamic implementation, virtual functions
dynamic implementation, virtual functions, actual size: Functions don t take any memory. However, virtual functions take some memory. Generally dynamic implementation might use some extra memory. Use sizeof() to get the actual size of the object (excluding the size of dynamically allocated memory in that object)...

C++: c++, object oriented programming, operands
object oriented programming, operands, sequences: In short no. (note: you could have determined this by just trying it - the compiler would have generated errors for your example code). Let us examine some possible reasons why C++ does not allow you to do this. With C++ you use a compiler to compile...

C++: about c++, str 100, vowel
str 100, vowel, vowels: Hi Moumita How are you ? Try this out #include iostream.h #include stdio.h void main() { char str[100]; int i, c = 0; cout Enter String: ; cin str; for(i=0;str[i]!= ;i++) if(str[i]== a || str[i]== e str[i]== i || str[i]== o ...

C++: c++, public variables, private variables
public variables, private variables, metric analysis: Hi there. Sorry for the delay.I am in the middle of my exams, so wont be able to help much. The line ch_class=fgetc(fp); is to be inserted just before the for loop ends so that the file may be read again. Here is your modified code: #include...

C++: c++, finite sequence, qaiser
finite sequence, qaiser, integer type: Hi Qaiser //where a is the array of integer type numbers and n is the no of elements present in the array int Max(int a[],int n) { int i, max; max = a[0]; for(i=0;i n;i++) if(max a[i]) max = a[i]; return max; } I believe this is what you are...

C++: c++, c programming language, bruce eckel
c programming language, bruce eckel, thinking in c: Why write a dummy project? Write some real code! Write some code in the area of your interest viz graphics. A language is just the beginning - then comes OO design and libraries. If you can, join a company or part time work in your area of interest - this...

C++: c++, class definitions, base operator
class definitions, base operator, assignment operator: This is not a term used in C++. C++ tends to use access specifier instead. However I will assume this is what you mean, as access modifier is used by other languages such as Java and C#. They are supported by the keywords public, private and protected and...

C++: c++, array size, questioners
array size, questioners, programe: Sorry but can you please try this yourself and then ask a question if you have some specific problem. I entered the wrong reply type and should have rejected this as I strongly suspect it is your homework or similar and I do not just do it for you (see my...

C++: c++, array array, array size
array array, array size, max 2: int iArray[] = {1,2,3}; int iMaxSize =3; int icount = iMaxSize-1; int icount1 = 0; while(i (Max/2)) { int temp = iArray[icount1]; iArray[icount1] = iArray[icount]; iArray[icount] = temp; icount1++; ...

C++: c++, ispace, pyramid
ispace, pyramid: cout number of characters to be printed ; int inum,ispace; cin inum; char *temp = new char[inum]; for (int i =0;i inum;i++) cin temp[i]; int count =0 ; ispace = inum; while( count inum) { for(int j =...

C++: c++, type conversions, integer value
type conversions, integer value, floating point: Well you really should not need to use static_cast int () for built in type conversions and promotions. This is because C++ allows arithmetic types to be converted from one to another or (slightly differently) one to be promoted to another. Casting of values...

C++: c++, david spector, kbhit
david spector, kbhit, getch: Luis, You are confused about kbhit and getch . Here is how they work: kbhit looks at the keyboard to see if the user has pressed any key. getch reads a keystroke. If the user has pressed a key, getch will return the character value and remove the...

C++: about c++, integrated development environment, general purpose programming language
integrated development environment, general purpose programming language, david spector: nick palmer, Thank you for your question. C++ is a general purpose programming language. This means that it can be used for many different kinds of programming, ranging from calculating experimental results in physics experiments to recognizing human speech...

C++: c, value error, pointers
value error, pointers, pointer: Hello debashis maity, NULL is a #define set to 0. You can gain access to it by including Windows.h . To me personally, it makes more sense to set my pointers to NULL than to 0. int *p = new int; delete p; p = NULL; The l-value error usually...

C++: c++, virtual destructor, david spector
virtual destructor, david spector, swapnil: swapnil gujrathi , Thank you for your question. A virtual destructor is just like a normal destructor except that it is executed when a derived class is cast to its base class, as shown below. There is no such thing as a virtual constructor. class Base...

C++: c++, finite state machine, c programmer
finite state machine, c programmer, program loop: Hello, Glad you liked it. Its really actually very easy. start of with something like: enum ACTIONS {LOCATE, ATTACK}; ACTIONS currentAction. Then in your main program loop, you just switch on the current action and apply a behavior. // in init...

C++: c++/c and Datastructer, c data structure, google
c data structure, google, accurate account: I don t have the datastructur s book yet that why i ask u You ll have a hard time learning data structures without at least one book on the topic. if u can not answer, it s never mind I would love to, but the subject is far too broad to give an accurate...

C++: c/c++ Overloading problem, c programming language, stack class
c programming language, stack class, c overloading: [note: I have not got the time to read through your full code so have only looked at what you posted in your question - sorry] The reason you are having problems is that you cannot overload function names on return type in C++. Overloaded functions have...

C++: c++ and com, david spector, copy constructor
david spector, copy constructor, homework questions: srinu naik , 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++: c++ and com, david spector, copy constructor
david spector, copy constructor, homework questions: srinu naik , 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++: c++ compiler, visual studio 2005, vstudio
visual studio 2005, vstudio, c compiler: Hi Paul, thank you for the question. http://msdn.microsoft.com/vstudio/express/ You can paste that link in your web browser and download a copy of Visual Studio 2005 for free. It is the best Windows IDE and compiler I have used for development. ...

C++: c++/cookies & cgi, load cookies, http cookie
load cookies, http cookie, cookie string: This is not a C++ question. As far as I remember, there is way (maybe using java script), to authomatically refresh the html document priodically. This cannot be handled in server side. It should be handled in client side (in browser). Ask a web expert to...

C++: c++ exception handling, c exception handling, exception handling in c
c exception handling, exception handling in c, c programmers: Dear Sunil! Even though C is a subset of C++ , Programmers Treat both c and C++ as a different language . Every language have its own method of error handling But many languages fails ( such as COBOL and so on .. ) If there is no error handling...

C++: c++ and files, rec class, premnath
rec class, premnath, int age: Hi dear jisha ! Your question is not too specific , you are looking for a project but you didn t specify the objective of your project ! Before using files in your c++ programs you should have some basic knowledge about the files , different types...

C++: c++ guessing game problem, game problem, correct guesses
game problem, correct guesses, 10 chances: int main () { int num; int guess, icorrectguess = 0; bool done; int noOfGuesses = 0; int ncount; num = (rand() + time(0)) % 1000; done = false; while ((noOfGuesses 10) ) { cout Enter an integer greater than or equal to 0 and ...

C++: c++ homework, cin cout, bruce eckel
cin cout, bruce eckel, pizza restaurant: Put is some effort dude. You could start reading Bruce Eckel s book Thinking in C++ which has both online and print versions. In this case it looks like a simple program. For example of C++ code, I made for a search: http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&q=filetype%3Acpp+cin+cout+while&btnG=Search...

C++: c++ operator overloading, operator function, parameter class
operator function, parameter class, operator functions: I do not know if you really intended to say: s1+s1 in your question, but maybe instead meant: s1+s2 as you go onto say both are objects implying two objects and not just one are involved. I shall assume the latter. The compiler sees...

C++: c++ primes numbers, endling, prime numbers
endling, prime numbers, primes: Hi, This is because the range in the for loop is set to 50; But, I am not sure about this method. If you try dividing the each number after 10 by the following numbers( 2,3,4,5,.. 9) and check for the remainder. Then you will not have the above problem....

C++: c program, itoa function, printf statement
itoa function, printf statement, printf function: Hi there: I hope u ll be fine. The actual thing in the printf function is majtime- tm_mon+1, majtime- tm_mday, majtime- tm_year+1900,majtime- tm_hour, majtime- tm_min, majtime- tm_sec, tmmin U need to convert all these seperatly to strings and then...

C++: c++ (program), divisors, c program
divisors, c program: int inum = 2,irem,iquo; while(inum = 30) { int i =1; irem = 1; while(irem 0) { i++; irem = inum%i; ...

C++: c++ program, fahrenheit temperature, celsius temperature
fahrenheit temperature, celsius temperature, shabah: What you need to do is summerized below: double calcCelsius(double in){ // return the converted temperature } void getFahrenheit(){ double in, out; // read using cin out = calcCelsius(in); // write using cout } int main(){ getFahrenheit();...

C++: c programming, code checks, correct syntax
code checks, correct syntax, c statements: Hello again Simon, thank you for the question. 3 is incorrect. When you check to see if something equals a value, you use 2 equals signs. The correct syntax is: if (n == 4) n = 0; Feel free to ask another question if you need clarification on anything...

C++: c++ programming, homework assignment, first position
homework assignment, first position, c programming: Hello Musa! This seems like a homework assignment to me :). That s really no problem. I ll help get you started; hopefully you ll have a clearer idea of what to do from there. This problem really isn t too complicated. We ll need to create our array...

C++: c++ programming, dynamic data structure, struct node
dynamic data structure, struct node, head pointer: Hello mushtaq, thank you for the question. Since it is not specified, I ll assume you are referring to a singly linked list. Lets think about what a linked list is. It is a dynamic data structure that manages nodes, which contain data, that grows and shrinks...

C++: c++ project, cpu scheduling program, proper parameters
cpu scheduling program, proper parameters, dynamic array: Hi Mai First take the inputs by creating a dynamic array and populate the array accordingly as you have got the inputs from the users. Now comes the second phase of the work that is calling the appropriate function with proper parameters so that you...

C++: c++ project!, jatinder singh, file bmp
jatinder singh, file bmp, vertical pixels: Hi dear Jatinder Singh ! There is yet another option instead of drawing an image ! , If you have the raster data of a image in a file ( say let the Image file be .BMP) then you can easily display the contents of the image file using appropriate C/C++...

C++: c++ question, memory objects, data areas
memory objects, data areas, mix and match: That really depends on the structure of the file. Here are some obvious ways you could achieve this. I do not claim this is an exhaustive list: 1/ Most obviously you read the whole file to determine how many objects are in it. Note that you do not have...

C++: c++ question, array example, variable lengths
array example, variable lengths, object oriented programming: Flowernblum, Sorry for the delay in my response. Midterms last week were pretty killer. Anyway objects are more of a descriptive term as oppose to an actual piece of code. A class has objects in it, for example, but those objects could be an array, a vector,...

C++: c++ Recursion !, recursive procedure, premnath
recursive procedure, premnath, procedure c: Hi Dear Qaiser ! Thanks for your question ! Here im presenting you the simple version of C++ program to calculate factorial of an integer using recursive procedure ! /* C++ Program to find factorial of a given number using recursion */ #include...

C++: c++ searching, hash key, microsoft visual studio
hash key, microsoft visual studio, empty position: Hello Flora, thanks again for the question. Sorry about taking 2 days to reply, I stay extremely busy with work and graduate school. I noticed that your original question was 1. create a hash key using modulo-division method 2. provide a function...

C++: c++ stack question, c stack, school assignment
c stack, school assignment, thanks in advance: Hello Lauren, thank you for the question. Yeah sure, I ll take a look at your code and help you all you want. There was a period for about 2 months straight where people would straight post the instructions to their assignments as a question, not even asking...

C++: c++ syntax question, syntax question, c syntax
syntax question, c syntax, void function: Dear Owais ! Here is the question ! I need to write a program that reads a student’s name together with his or her test scores. The program should then compute the average test score for each student and assign the appropriate grade. The grade scale...

C++: c++ & visual c++, integrated development environment, graphical games
integrated development environment, graphical games, win32 api: Hello. Thankyou for your question. C++ and Visual C++ are first are the platform for C++, but ofcourse they are not same. They vary differently in their Integrated development environment. Turbo C++ , you can say, you have to build everything from...

C++: c++ and visual c++, david spector, charles petzold
david spector, charles petzold, itt tech: Dereck , 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++: c++ and windows, david spector, ring 0
david spector, ring 0, unix type: mahdi naser moghadasi , Thank you for your question. To the best of my knowledge, Microsoft uses Visual C++ to build most of the Windows operating system. Similarly, Unix manufacturers use C++ compilers such as gcc to compile Unix-type operating systems....

C++: c++, david spector, homework questions
david spector, homework questions, domestic users: audrey , 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++: how to calculate perfect Squares, perfect squares, madam
perfect squares, madam: for( int i =2;i =1000;i++) { for( int j =2;j = i;j++) { if( (i%j) == 0) { if( i == (j*j)) { cout the square is i; }...

C++: call by referance keeps the..., recursive implementation, relevant answer
recursive implementation, relevant answer, call by reference: This is _not_ a C++ question - it is a general programming question. Call by reference passes a reference to a variable, so modifying the variable referred to by such a parameter within a function call modifies the variable referred to that is outside the...

C++: calloc and malloc, void pointer, calloc
void pointer, calloc, insufficient memory: malloc allocates memory blocks and returns a void pointer to the allocated space, or NULL if there is insufficient memory available. calloc allocates an array in memory with elements initialized to 0 and returns a pointer to the allocated space. calloc calls...

C++: case sensitive problems, upper case letters, microsoft visual c
upper case letters, microsoft visual c, numeric keypad: The reason is (if you read the documentation carefully) is that you are dealing with MS Windows virtual key codes and _not_ character codes. A virtual key code represents a key on the keyboard and _not_ the character it would produce under current keyboard...

C++: cast a super array type to a sub array type ?, heap in c, value semantics
heap in c, value semantics, array type: First apologies for taking a bit to get back to you. I have been away for a little longer that planned and have only just now got back to my workstation. No. Not meaningfully or safely in general, and as far as I know from the standard and as claimed by...

C++: casting a colorDialog result to a string, ms windows platforms, rgb triplet
ms windows platforms, rgb triplet, win32 sdk: The compiler cannot cast integers to strings, this is not allowed. Mostly inbuilt casting allows converting between integer types or related types or types with similar qualifications. Also the compiler does not know of your type String - C++ has no inbuilt...

C++: cd protection software, david spector, cd protection
david spector, cd protection, experts exchange: Muhammad Atif Saeed , 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 at www.experts-exchange.com, which is more advanced than allexperts.com. Please be advised...

C++: certified C++, relevant work experience, david spector
relevant work experience, david spector, c field: tom Wynne, You score higher than other candidates if you demonstrate greater knowledge of software engineering relevant to the mission of the company, greater relevant work experience relevant to the mission of the company, and/or greater people skills. ...

C++: changing the name of a text file ., double quotes, variable value
double quotes, variable value, n1: First I shall point out that the subject line is misleading. Changing the name of a text file sounds like you wish to change the name in the file system (like a rename, mv or ren operation from a shell or command prompt). In fact all that you need to do is...

C++: char* versus _TCHAR, microsoft win32, win32 sdk
microsoft win32, win32 sdk, spacing purposes: names is an array of four pointers to _TCHAR so you pass it as names. However you do have to get the type correct in the function declaration. people.SetNames(numPeople, names) Does not tell the whole story does it? What is needed is the declaration...

C++: check status without reading from input stream, input request, streambuf
input request, streambuf, input stream: Your problem is that C++ streams and streambufs are synchronous, that is they block until done. If you ask for a character to be read then the program will block until a character is read or there is an error. So your program will block until there is...

C++: checking if a string consists of all numbers or not.[Part II], atoi function, work string
atoi function, work string, c style: Hello James, thank you for the question. I m not sure why I didn t catch this earlier, probably because I was on my way out the door when I answered. atoi takes in a char* as a parameter. You are passing an individual character. That s why it s complaining...

C++: checking if a string consists of all numbers or not., numeric digits, atoi
numeric digits, atoi, isdigit: When you say you want to check if a string contains a number, you need to have a strong idea of what a number is. Do you want a valid integer, which can include - and + as well as the numeric digits? Or do you want a valid floating-point number, which...

C++: checking if a string consists of all numbers or not., algorithm, checks
algorithm, checks, 12345: Hello James, thank you for the question. Though there is no function to call to directly determine if a string is all numbers or not, you could use the function atoi() to figure it out. atoi() takes a string and converts it to an integer. You could...

C++: circular reference of header files, forward declaration, dynamic simulation
forward declaration, dynamic simulation, simulation program: Hakan Tiftikci, Thank you for your question. I regret that I am unable to take the time to study your source code due to the volume of questions received. Most circular-reference declaration problems can be resolved by using partial class declarations,...

C++: class, meta programming, classb
meta programming, classb, classa: The short answer is no, you cannot compare classes. However I do not think you meant to ask about comparing classes did you? Do you mean comparing objects of different classes? I hope so. If not please post a follow-up question clarifying what you are...

C++: about class access modifiers ?, c const, explicit copy
c const, explicit copy, copy constructors: Yes. That s what I rely on – static member functions for example have access to private and protected members of the class they are members of – you just have to remember to obtain an instance from somewhere if you wish to access any instance members: ...

C++: class code translation, visual c 6, david spector
visual c 6, david spector, code translation: PJ, Thank you for your question. Since your deadline has passed, I assume you have already solved this problem. If not.... I would design a class that represents an open box. It would have a member variable that represents the size of the cutout squares....

C++: class, rectangle class, class rectangle
rectangle class, class rectangle, class shape: Hello Daniel, thank you for the question. First you start off declaring your Shape class, which would contain all of your basic properties that are common to all shapes. This would probably be an abstract base class. Then you just inherit classes from it,...

C++: classes, c standard library, vector class
c standard library, vector class, vector data: Assuming you are using the C++ standard library, which is likely judging from your previous question, why bother? The standard C++ container adapter std::queue functions in this fashion anyway. The operation is called front() – it returns the next element...

C++: coins, correct dollar, coin tray
correct dollar, coin tray, half dollars: Hello Jeffrey, thanks for the question. Perhaps you are overthinking the problem here. All you really need to do to give the impression of dollars and cents is to total everything up and store it in a float: #include iostream using namespace std;...

C++: about combuter science, deitel and deitel, computer science bsc
deitel and deitel, computer science bsc, cobol ibm: Dear Nasser, thankyou for your question. First of all, feel free to ask anything you want, thats what we are for to help the people. I will try my best to help you as much i can. Nasser if you are looking for some good books on Java and C++, i would...

C++: What compiler is good, windows c compiler, compilation speed
windows c compiler, compilation speed, writing the script: Hello charbar, thank you for the question. C++ in general compiles slowly compared to most other languages. They way you write your code has some to do with compilation speed. But, overall, no compiler is going to be noticeably different. - Eddi...

C++: compiler linking error, asm files, obj files
asm files, obj files, turbo editor: Hi, When you compile, the following things happen: [1] All includes (.h) files in .c/cpp/cc are processed [2] All c/cpp files are converted into .asm on windows and .s on unix machines [3] these s/asm files are converted into o/obj files [4] these...

C++: compiler question, integrated development environment, microsoft visual studio
integrated development environment, microsoft visual studio, microsoft compiler: Hello lexy, thank you for the question. As obvious as it may be, I would have to suggest C++ as the programming language you request, as it is supported by numerous compilers. Microsoft Visual Studio.NET(which I highly recommend), Borland C++, and GNU...

C++: which compiler to use, microsoft developer network, medical retirement
microsoft developer network, medical retirement, shareware market: Hmmm, well I should make it clear these are only my suggestions - others may well see things differently. Some people like one compiler other like another. To some extent it depends on what you are doing. The obvious choice for Microsoft Windows is Microsoft...

C++: compiler, c borland, microsoft visual c
c borland, microsoft visual c, compilation time: Lexy, Sorry it has taken me so long to respond to your question. My life has been crazy hectic as of late. Unfortunately, I m not really sure I have an answer for your question. I ll tell you what I can, so I m going to use C++ as an example case, since it...

C++: compilers, computer access
computer access: Hello raj, thank you for the question. Wow, that s a broad question you have there. Do you mean how many different compilers are there for C++? How many different manufacturers of compilers are there? If you could please give me a little more information...

C++: compiling C++ on redhat linux8.0, gnu c compiler, c standard library
gnu c compiler, c standard library, std namespace: I am not sure what your current configuration of the GNU C++ compiler is but I think it is probably fairly standard - is it a 3.x version? If it is compiling your program and giving reasonable errors as it seems to be doing then it is working! Assuming...

C++: a compiling error, single dimensional array, null space
single dimensional array, null space, c version: Dear Sara, Thankyou for your question. Well, first of all you should make the changes later, let me comment on the main error why your program is not running. Please check the prototype of the function which you have given like void subset( char...

C++: compression, scene graph, compression routines
scene graph, compression routines, costs money: Hello Tony, thank you for the question. No, I do not. I think it s a secret, as WinZip costs money. I know that the open source engine Open Scene Graph can open .zip files, if you download the source and look over, you should find it in there. - Eddi...

C++: computer, introductory c, introduction to c
introductory c, introduction to c, c book: These are needed for repeatedly performing some task. Please take a look at any introductory C++ book. Excellent introduction to C++: http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html - both print and electronic versions are available! I hope...

C++: confuse about string allocation, character memory, memory location
character memory, memory location, memory allocation: Dear Shiva, thankyou for your question, sorry for the delay. Now lets review your question. a) Your question, how does a pointer take two bytes. Well the question is more hardware dependent, i guess you have intermediate concepts about memory word which...

C++: why const member, reference member can only be initialized not assigned, member reference
member reference: The reason for reference should be initialized when they are created is aside from initialization you cannot change what object a reference variable points to. Member specified as const cannot be changed by your program.A const variable will either receive...

C++: about constructor overloading, default constructor, class x
default constructor, class x, doubt: Hi Naim Creating Constructor of various form is called constructor overloading class X { private: int x, y; public: X()//default { x=0; y=0; } X(int a,int b)//overloaded constructor { x=a; y=b; } }; void main() { X a;// this invokes...

C++: constructor overloading, copy constructors, copy constructor
copy constructors, copy constructor, default constructor: OK, although a constructor for a class is a special member function it is still considered a function and like all functions in C++ its name can be overloaded. This is the practice of using a function of the same name but having different types and/or numbers...

C++: Can we make a constructor virtual?, clone method, virtual thanks
clone method, virtual thanks, virtual member: So if you could how would this work? The polymorphic behaviour that virtual member functions allow us to achieve work through base pointers or references to _existing_ objects. How then can you polymorphically directly create an object? Where is the...

C++: constructor, virtual destructor, virtual constructor
virtual destructor, virtual constructor, rare cases: you need virtual destructor, when there is acase where someone would dlete a drived object, using the base class pointer. For instance, if p points to SHAPE object and q points to CIRCLE object that is drived from SHAPE. Then if you have p=(SHAPE)q and then...

C++: converter???, java converter, google
java converter, google, duds: Hello Gerard, thank you for the question. After google bashing for quit a while, I was unable to find a valid link to an app called C2J++. However, I did find one that I think might be better, according to its description. It is called ephedra and apparently...

C++: converting byte sequence to float, video frames, thresholding
video frames, thresholding, c int: To be able to answer your question I need to understand what are the contents of one byte of the sequence. For example, if it contains integer, you could cast (reinterpret_cast) the byte to an integer, and then cast (static_cast) it into float. float...

C++: converting to vb, visual basic arrays, loop syntax
visual basic arrays, loop syntax, valid syntax: Hello again Mike. Thanks for the question. The expression (i==1 && leap) is either going to yield true or false, which is defined in the compiler as 1 and 0 respectively. So either 1 or 0 will be added to the array index. Once again, I must reiterate that...

C++: cookies involving mapping, load cookies, http cookie
load cookies, http cookie, login session: First, you cannot mail me as you do not know my address - at least I hope you do not, and if you do then I would treat it as suspicious! Second, you _are_ using classes even if you had not thought about it, which is as it should be - std::string, std::map...

C++: copy constructor, david spector, class instance
david spector, class instance, copy constructor: Srini , Thank you for your question. The purpose of a copy constructor is to make a copy of a given class instance, specified by a reference to it. If the class instance were specified directly, the compiler would attempt to make a copy of the given...

C++: how can i copy and paste websites etc, qbasic programme, ms qbasic
qbasic programme, ms qbasic, novice programmer: Wilson, I m not entirely sure I understand your question - are you asking how to copy and paste source code from websites into a file, then compiling that file? Or are you asking something else (i.e. the reframing of the code)? If you could provide me with...

C++: copying a function, target source, class templates
target source, class templates, class template: This seems easy in concept, but is in fact quite when you sit down and consider all the details. The concept is easy: - Open the source source-code file for reading - Read it to locate the function in question. - Open the target source-code file...

C++: counting repeated words in a string using pointers, david spector, paragraph 5
david spector, paragraph 5, element 5: salloum, ahmad , Thank you for your question. There are several efficient ways to do this, but since your assignment looks elementary, you probably will bs satisfied with an inefficient (slow) solution that works. Psuedocode: Declare a dynamic list....

C++: cout data, k abc, subscript
k abc, subscript, ios: Hello Daniel, thank you for the question. I m not quite sure exactly what your question is. If you want to print that subscript in your array, why not do exactly what you typed? You can cout that individual subscript outside of that loop no problem. If...

C++: how to create a button??, win32 application, hwnd hwnd
win32 application, hwnd hwnd, int id: here is a simple example for edit control, Button will also work in the similar way. class SimpleControl { public: SimpleControl (HWND hwndParent, int id) : _hWnd (GetDlgItem (hwndParent, id)) {} void SetFocus () { ...

C++: how to create dead objects, garbage collection, hi friend
garbage collection, hi friend, array: Hi Prasanna! Thanks for your question. A dead object is an object that can t be reached by the program. For example, if I create an object with a new command, and then fail to free the object after it goes out of scope (after the program is no longer able...

C++: How do I create a Resources compiler?, novice programmer, graphical business
novice programmer, graphical business, paint program: Hello Ian, thank you for the question. There is actually a couple different ways to go about this. What you should do is make your display function take a string parameter, which would be the path to the file. You could do this from the command line, or...

C++: creating 2D array dynamically, one dimensional arrays, 2d array
one dimensional arrays, 2d array, 2d arrays: In short no; you can only create scalar objects and vectors (one dimensional arrays) of objects dynamically. However you can get a similar effect by doing the number-of-elements and subscript-to-element calculations by hand thus: int main() { size_t...

C++: about creating folders.., int fildes, linux commands
int fildes, linux commands, error indicator: Hi James, Please find the information below. By the way, on linux, if you are not able to open a file in your code, then it would mean : [1] File is not there [2] You do not have permissions for reading that file. If you use fopen in C then the FILE...

C++: about creating folders.., system functions, man page
system functions, man page, folders: Yes,you can do all of those in C++, using system functions. Remember that this functions are system dependent and usually are different in unix or windows. At the moment I don t have access to the man page, as so cannot give you the function names. You should...

C++: creating a messanger, david spector, mfc dlls
david spector, mfc dlls, extension library: Mahdi_N_Moghadasi, Thank you for your question. An MFC Extension Library is either a set of classes that complement MFC, or a DLL that works with MFC. DLLs are usually distributed in files xx.h, xx.lib, and xx.dll. To use such a DLL, add a statement...

C++: creating resource file in Visual C++ 6.0, visual c 6, david spector
visual c 6, david spector, rc file: winston morris , Thank you for your question. Make sure that the resource file is the main one for your project. If you create a standalone RC file, no software will use it. Also, note that all a menu is is a data structure; to make it be displayed,...

C++: Data structure using C++, d s malik, array implementation
d s malik, array implementation, data structures using c: Hello jerry, thank you for the question. The code you have provided is very clean and concise. It adheres to the quote from the book. It uses a variable to keep track of its place in a queue, which is implemented as an array. I was able to cut and paste...

C++: Data types, strange answers, max value
strange answers, max value, simple c: Hello Muzafar Mahgoub, thank you for the question. Unfortunately, there is no other data type that can store a floating point number that big. The creaters of the language didn t think anyone would ever need that much precision. As for regular numbers,...

C++: Database in C++ w/ Little Experience, ms windows operating systems, common object model
ms windows operating systems, common object model, excel spreadsheet: When writing programs that communicate and control with Excel or other applications, you will need to use the facilities provided for you to do so by those who created the application. This has little to do with C++ - you could use C or Visual Basic or some...

C++: Database connections, network connectivity, simple c
network connectivity, simple c, database connections: Dear Mauro. Thankyou for your question. Well i havent worked under C Sharp, but i can suggest onething as the network connectivity is involved, you need to study C# .net for that. I hope this helps, please dont be afraid to other questions if you have...

C++: Date class, david spector, wsprintf
david spector, wsprintf, application library: Christy , Thank you for your question. There are many ways to handle dates. You can use functions such as time and mktime (using datatypes time_t and tm ) to manipulate dates. You can print a date stored in a tm struct using any formatting you...

C++: Deadlock Detection program in C++, resource graph, deadlock detection
resource graph, deadlock detection, data corruption: Hello Shawn, thanks for the question. I m not sure exactly what you mean by detecting a deadlock. What you can do to prevent data corruption and deadlocks is to use a CRITICAL_SECTION object. If you go to the MSDN and look up the help for CRITICAL_SECTION,...

C++: Debug Assertion Failed!, last ditch attempt, assertion failure
last ditch attempt, assertion failure, allrecipes com: Gail Timmermans, Thank you for your question. I suggest that you also post this question in the Windows section of www.experts-exchange.com. The error message you are getting is a last-ditch attempt by Windows to help software developers find a problem...

C++: Delete array of pointers, array of pointers, pointers in c
array of pointers, pointers in c, time errors: Hello Sam, thank you for the question. Sure, I would be more than happy to help. I was wondering if you could sent me your actual allocation code so I can get a better understanding of what is going on. Like right now, I can t tell what a StructureSize...

C++: Delete duplicate elements in vector, c standard library, c array
c standard library, c array, shuffles: Answer: ------- First I think your example line: str[0] = a; str[1] = b; str[2] = c;.....and so on. is _not_ what you intended to say unless there are variables a, b, c, etc. that contain the string values a , b , c , etc.– I get the point...

C++: Deleting Files, deleting files, unix machines
deleting files, unix machines, complete solution: use fuser command using system() function in C++ (this would work for Unix machines) for the files that you are seeing. fuser file_name would return the program name which is using that file currently. But if the file is not being used currently (that...

C++: Deskmate, desktop check, getdc
desktop check, getdc, setpixel: Hello again Clary, Sure you could program something like that in C++. You can get the handle to the desktop window by calling GetDesktopWindow(), then get a handle to a compatible device context by calling GetDC(), then use functions like BitBlt(), and...

C++: Developer's Productivity, comman, development career
comman, development career, worki: Hello Developer, thank you for the question. A developer s productivity is really an individual thing. One of the things I do at my job is specifically request tasks that I enjoy doing. When I enjoy doing tasks, I tend to be more productive and end up getting...

C++: Device Programming, bc109, software development kit
bc109, software development kit, pci slots: Note this is no longer an area of my expertise - I have not looked into this sort of thing for about 10 years. I also am _not_ going to develop any software for you for free or without more concrete information on the device setup. Anyhow here are some pointers:...

C++: Difference between Overriding and Overloading, scope resolution operator, class implementation
scope resolution operator, class implementation, virtual void: Yes, your thinking is correct. Think of it like this: Overriding, say you have a base class called WorldObject. It has a method called Update, which is called once per frame. You put all of the base code all WorldObjects would need to do in the update like...

C++: DirectDraw Surfaces, david spector, directdraw surfaces
david spector, directdraw surfaces, bmp file: Chris Hollman , Thank you for your question. I regret that I do not have the knowledge to answer this question (please note this in your evaluation of my response). I haven t gotten into Direct Draw yet. I suggest that you post this question at www.experts-exchange.com,...

C++: Directory contents, david spector, compliant systems
david spector, compliant systems, runtime libraries: De vez en cuando, Thank you for your question. I believe that enumerating the files in a given directory is supported only by underlying operating systems, and not available in either the C or C++ runtime libraries. If your code will be known to run...

C++: Disabling(or controlling) write click, default compiler, default definition
default compiler, default definition, flash code: Hello Mohammad. thanks for the question. If you need to take care of that in flash code, I have no clue how to do that, because I don t know flash. If you need to do it in C/C++ all you need to do is just provide a default definition for VK_RBUTTON: ...

C++: Dll help, framework system, string types
framework system, string types, stdafx: First I shall apologise for any shortcomings in this answer. Your question is not really a C++ question as it related to using a specific implementation of C++ with an environment for which non-standard extensions and rules apply - namely .NET and the CLR...

C++: Doesnt a static object need to be destroyed when it a member of a class and the class is destroyed, constructor and destructor, static object
constructor and destructor, static object, nuc: You seem to have two points of confusion. The first is to confuse a class with the objects (or instances) of that class. The second, following on from the first I think, is that classes are destroyed. Classes are types. In C++ they have to be defined,...

C++: Don't understand how to start this program at all :(, enviromental awareness, linux compiler
enviromental awareness, linux compiler, awareness club: Ryan, This is definately a tricky question. I ve come across problems like yours when it comes to knowing what information goes where. Fortunately, there is a relatively easy solution to this. Before you start reading the file, create an vector of type...

C++: Double dimension ARRAY, double dimensional array, magic square
double dimensional array, magic square, clarity: Hello, thank you for the question. Since this appears to be a simple problem from lack of clarity, I ll just go ahead and solve it. Every which a way has to add up to be the same thing. How about this: int square[3][3] = { {1,1,1}, {1,1,1}, {1,1,1}...

C++: Doubly Linked List, node class, int size
node class, int size, object object: Imran Ahmad Mughal, 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...

C++: Doubly Linked List, node class, int size
node class, int size, object object: Note that I am _not_ going to send you fully operational code. I will show you where I think you went wrong and one way to fix it. You will have to do the work of integrating my ideas into your code yourself however. Your problem I think is that you tend...

C++: Doubt about inline function, inline functions, public int
inline functions, public int, visual basic c: hi Kedar Inline functions gets expanded like a macro in order to increase the performance and efficiency of code ... generally small function without loops are kept inline ... and one more thing things that as it gets expanded during pre processing you...

C++: Downloading a file online., c iostream, network sockets
c iostream, network sockets, standard c library: In short, no not like this. The file name you give is a URL and the first part of this specifies the internet protocol to use to access the file - in this case the HTTP protocol. This is a network protocol and usually implies the use of network sockets...

C++: Draw a Animated dotted Rectangle., david spector, topic trackers
david spector, topic trackers, msdn library: pubudu , Thank you for your question. You probably want to use the CRectTracker class. See topic Trackers: Implementing Trackers in Your OLE Application in the MSDN Library. You can search Microsoft s MSDN Library at http://search.microsoft.com/us/dev/default.asp....

C++: Drawing shapes using turbo c, turbo c compiler, getdc
turbo c compiler, getdc, diamon: Hello Oz, thank you for the question. Windows is my forte. If you include the header file Windows.h you get access to all the windows GDI functions, which you can use to draw. The only functions it has premade to draw shapes are Ellipse() and Rectangle()....

C++: Drectory Search Handler, slaman, searching files
slaman, searching files, string filename: Wael, I regret that I am unable to take the time to study your source code due to the volume of questions received. If you can create a shorter example, a tiny test case, or a more specific question, I will be pleased to help you. Your description to BROWSE...

C++: Dual Control Problem, multitasking operating system, processor cores
multitasking operating system, processor cores, server operating systems: This is an interesting and complex question so I am going to have to give you an overview and let you research the areas that interest you. Then please feel free to ask more specific questions. The short answer is don t if you do not have to. If you think...

C++: Duplicates, array examples, dimensional arrays
array examples, dimensional arrays, ntcs: These are easy questions for anyone learning C++. I will refer you some example code, and hope you go to the examination after having understood (and written some small programs yourself) the code: array examples: http://www.fredosaurus.com/notes-cpp/arrayptr/array-examples.html...

C++: Dynamic Memory Allocation, dynamic memory allocation, dynamic memory management
dynamic memory allocation, dynamic memory management, static memory allocation: Dear Adrien, Thankyou for the question. I am sorry for the delay as i have been out for some days. What i understood from your question is that, what is the benefit of Dynamic Memory allocation over static memory allocation. Well, lets take your...

C++: Dynamic Memory Allocation, dynamic memory allocation, dynamic memory management
dynamic memory allocation, dynamic memory management, static memory allocation: First we usually just say just at runtime not at the runtime . The second point is that you have missed the point ( g ). Yes you can say char * array = new char[1000]; and then, if the creation was successful when you have done with the...

C++: Dynamic Variable Names, strong typing, variable names
strong typing, variable names, best of luck: Dear David, Thanks for your question. Well the main function worked connectly but as soon as you enter the function, it wont work, because the compiler will be confusd in both of names and it will give a error like Multiple Declarations of Var ...

C++: Dynamic Variable Names, c standard library, library function
c standard library, library function, c tutorials: --------------------------- FOLLOWUP ANSWER: --------------------------- Overnight (yes it was around midnight - BST - when I posted my answer) I realised that I forgot to correct one of those errors I mentioned might creep in. The insert operation...

C++: what is data binding, object oriented language, procedure oriented language
object oriented language, procedure oriented language, parameter c: Hello Chinna, thank you for the question. Number 1: By data binding I m assuming that means storing data in a variable. I m not familiar with that term, but my guess seems to make sense. Yes, one of the principles of the C++ language is the ability to store...

C++: Is data hiding can be done in c++, binary level, c level
binary level, c level, variables: Hi, This way not only you can see but also write the data using memcpy() :--). Data hiding is not at the binary level. It is till the C++ level where using C++ you would not be able to change the data. Yeah of course if you use this kind of stuff, not...

C++: database access, ms access programming, david spector
ms access programming, david spector, msdn library: jayasankar, Thank you for your question. I have not done any MS Access programming from Visual C++. I suggest that you post this question at www.experts-exchange.com, which is more advanced than allexperts.com. Also, you can search Microsoft s MSDN...

C++: database connectivity in VC++, odbc functions, database connectivity
odbc functions, database connectivity, database commands: In Windows environment, the best option is ODBC which is an interface that let your program to communicate with different databases in the same manner. In that case, you need to study ODBC functions. Other way is just study the interface each database provides...

C++: How to declare array of istream, scalar type, stream classes
scalar type, stream classes, open test: My first reaction is that there seems little point in what you are doing. All the instances of the file you open using the techniques you are trying share the same filebuf, so what is the point of using more than one std::fstream object (or std::ifstream object...

C++: class and struct2, consistent state, fatal flaws
consistent state, fatal flaws, public int: Ken, I didn t have much time to look at the code and run it but seems to be, there are some fatal flaws in this program. First let me clarify some concepts, ofcourse Structs can provide the same functionality as Classes and they can also use specifiers,...

C++: deep and shallow copy, david spector, shallow copy
david spector, shallow copy, memory block: ken, Thank you for your question. I m not sure that these are C++ concepts. A shallow copy generally means copying bits from one memory block to another. A deep copy generally means recursively copying variables in a nested structure, or objects in...

C++: destructors
Hi, As far as I know it can be called explicitly in both cases. Within a class it can be useful if the object maintains some kind of reference count and deletes itself when nobody is using the object anymore (by calling delete this ). Evgeny...

C++: dev-c++, command line option, output directory
command line option, output directory, exe file: Hello maki, thank you for the question. Although I have never used dev-c++, I can sense something is not right here. When you click the run button, all it is doing is running the .exe. The whole point of the compiler is to build the .exe, so something is...

C++: dev-c++, documents folder, exe file
documents folder, exe file, c compiler: Maki, Sorry for the delay in my response, I ve just come home from vacation and I must have messed up the dates for being away. Anyway, in my experience, I have found that C++ compilers always create the .exe file. The kicker is where the file was created....

C++: dialogs in visualc++, zero values, hi thanks
zero values, hi thanks, dialogues: Anonymous, I apologize for the late response. Unfortunately, you have not given me enough information for me to be able to answer your question. For example, what is the Updatedata function? Are you using MFC or not? How are you reading the values from...

C++: difference b/w c++/Visual c++, basic programming language, c programming language
basic programming language, c programming language, david spector: Waqar , Thank you for your question. The simple answer is: C++ is a programming language. Visual C++ is a program development environment, including a compiler for C++, sold by Microsoft. Visual C++ is capable of compiling standard C++ (using an option...

C++: What is the difference between 'binary numeric operator' and 'arithmetic operator'?, arithmetic operators, binary calculations
arithmetic operators, binary calculations: Hello lzzzz, thank you for the question. I m not sure what either of those terms mean. There are multiple arithmetic operators in C++. There are also multiple operators that allow for bitwise binary calculations as well. If you could provide a little clartification...

C++: the difference between turbo c++ and borland c++, david spector, c programming language
david spector, c programming language, experts exchange: sara , 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 at www.experts-exchange.com, which is more advanced than allexperts.com. Or find the Web site for Borland compilers....

C++: the difference between turbo c++ and borland c++, borland compiler, microsoft visual studio
borland compiler, microsoft visual studio, academic version: Hello, I think the only differnece is that the Borland compiler is free. I use Microsoft Visual Studio.NET and would highly recommend it. You can get the academic version of it for free as well I believe on microsoft.com I hope this information was...

C++: difference between turbo c++ and Unix c++, application programming interfaces, ms dos windows
application programming interfaces, ms dos windows, c in unix: Firstly I would like to point out that there are differences in programming in Turbo C++ and Turbo C++ - it depends on which version you are using. See for example the Wikipedia article on Turbo C++ at http://en.wikipedia.org/wiki/Turbo_C++. Secondly it...

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