| Subject | Date Asked |
|
| c++ | 10/24/2009 |
Q: could u pls help mi,i realli need your help.i am trying to do a simple addition of using class ... A: You're actually very close. You want to modify the class on the left side of the operator though. ...
|
| logic for algebraic operation of large number | 10/22/2009 |
Q: I have got an end semester project in c++. In this project we have to write the program to add, ... A: In C++, the largest number you can add is UINT_MAX, which has a value of 4 billion and some. If you ...
|
| Object Instantiation vs. Dynamic Memory Allocation | 10/11/2009 |
Q: Say you have class A, you can instantiate an object of class A like: A a; And then you can do ... A: The reason you get a crash is because in the second code snippet, you are trying to access a pointer ...
|
| Object Instantiation vs. Dynamic Memory Allocation | 10/11/2009 |
Q: Say you have class A, you can instantiate an object of class A like: A a; And then you can do ... A: When you create a variable such as A a, this allocates memory from the stack. What this means is ...
|
| How can i print graphics in c++? | 10/7/2009 |
Q: I have been programming for a while now, i have used Blitz, Basic, and some C++. In C++ i only know ... A: I'm sorry for the delay, I haven't had access to the internet. Graphics can be done using the ...
|
| hi | 10/6/2009 |
Q: can you tell me what a difference between binary and linear search?using examples? A: A binary search usually starts from the middle of a collection and continues subdividing the ...
|
| pointers and arrays | 10/2/2009 |
Q: what are they and what do they do?can you give me an example? A: A pointer is a type of variable that can store a memory address as its value. Pointers can be of any ...
|
| C++ | 10/2/2009 |
Q: Difference between Dynamic memory allocation and dynamic objects? A: Dynamic memory allocation is when you explicitly assign a memory address to a variable with the new ...
|
| gettext equivalents | 9/21/2009 |
Q: I'm a c++ beginner using Dev-C++. I'm trying to read text (single character) from a specific x,y ... A: You're right that you are printing out a memory address. You created an array of 2 char_info's. The ...
|
| gettext equivalents | 9/19/2009 |
Q: I'm a c++ beginner using Dev-C++. I'm trying to read text (single character) from a specific x,y ... A: The problem seems to be the conio.h only seems to define a couple standard functions in it, with ...
|
| gettext equivalents | 9/18/2009 |
Q: I'm a c++ beginner using Dev-C++. I'm trying to read text (single character) from a specific x,y ... A: I'm not familiar with the gettext method myself, but after doing some searching on the internet, I ...
|
| mouse interfacing | 9/16/2009 |
Q: give me any simple code in c/c++ that applies mouse interfacing A: GetCursorPos retrieves the current position of the mouse, so lets use that. POINT p; ...
|
| print f and scan f | 9/13/2009 |
Q: what is print f and scan f functions A: printf is a C function for writing to an output stream, and scanf is a C function for reading input ...
|
| cpp program | 9/8/2009 |
Q: (c) Write a C++ program to create a bank account which includes account num- ber, name, account type ... A: I don't see an actual question here. Is there a particular problem you are having with the ...
|
| clrscr() function header file missing | 9/2/2009 |
Q: its not getting build as header file is missing. what should i add to resolve the error? A: I've heard of the clrscr() function, but I'm not sure if it's a C standard function or not. If it ...
|
| this pointer | 9/1/2009 |
Q: In operator overloading , we often return this pointer from a operator function. But the return ... A: The return type of the operator overload specifies the type of variable that it returns. So if you ...
|
| concept of heap | 9/1/2009 |
Q: im a BS-information technology student.i have a problem with my assignment.my topic is all about ... A: The heap is a block of memory that can be managed by the programmer directly, as opposed to the ...
|
| C++ header files | 8/23/2009 |
Q: I have knowledge on how to program in java and have been trying to learn c++ over the internet. when ... A: A header file in C++ is pretty much equivalent to a .java file in Java, except that the definitions ...
|
| Student Detail Recording System | 8/22/2009 |
Q: i am required to develop a system to record details of student. This system should be ... A: If you want insert into your array, just start at index 0 and increment a counter to hold your ...
|
| Student Detail Recording System | 8/21/2009 |
Q: i am required to develop a system to record details of student. This system should be implemented ... A: A struct is just a collection of data. I'd implement it like this: struct StudentRecord { int ID; ...
|
| file process | 8/14/2009 |
Q: i want to insert an existing or not file's name from the kayboard to be associated with the stream ... A: You look to be pretty close. std::string fileName; std::cout << "Enter a file name"; std::cin >> ...
|
| Output file name in C++ | 8/5/2009 |
Q: I have wrtiting a c++ program below: #include <fstream.h> #include <iostream.h> #include <stdio.h> ... A: I apologize for not responding sooner; I didn't have internet access for a couple of days. The ...
|
| dynamic allocation | 7/31/2009 |
Q: How are you? I know how to declare dynamically an array of objects of class MyClass: MyClass ... A: Since you want a 2D array of pointers, I think that would need to be declared as a triple pointer. ...
|
| source code | 7/31/2009 |
Q: I have an .exe file that I am trying to get the source code for, ive decompiled the file and have a ... A: I am unaware of any way to convert assembly back into C++. I'm not even sure if it's possible. If ...
|
| visual c++ 6.0 error | 7/30/2009 |
Q: i'm newbie to this program though i did some basic programs in dos. my scenario is when i'm trying ... A: It appears that you don't have a main function defined. When you open your solution, does it ...
|
| c++ | 7/26/2009 |
Q: Sir, i want to know which is faster for(int i=5;i>0;i--) { . . } or for(int i=0;i<5;i++) { . . } A: Both of those for loops are equal. In fact, depending on how the compiler optimizes the looping, the ...
|
| convert pseudocode to C++ code | 7/25/2009 |
Q: I'm new in programming.I do not know how to convert the pseudocode to sourse code.hope that u may ... A: Are you at all familiar with C++ syntax? Assigning variables and reading input from the keyboard? ...
|
| default arguments | 7/21/2009 |
Q: i have a question about default arguments in c++. could you plz tell me what's the implication ... A: That means that when you define default parameters for a function, they have to be the last ...
|
| Class and Objects | 7/18/2009 |
Q: can you help me understand some class questions? 1) Must the class be declared as a global ... A: I'm really sorry it's taken me so long to reply. I came down with bronchitis early last week and ...
|
| Output file name in C++ | 7/17/2009 |
Q: I have wrtiting a c++ program below: #include <fstream.h> #include <iostream.h> #include <stdio.h> ... A: You can accomplish this with the float data type just like you would an integer. float a = 0.01f; ...
|
| allocation | 7/17/2009 |
Q: I have this loop in my program where I repetedly create an array of pointer to class MyTree ... A: In order to create an array of pointers, you would have to call on new on each individual pointer in ...
|
| Output file name in C++ | 7/16/2009 |
Q: I have wrtiting a c++ program below: #include <fstream.h> #include <iostream.h> #include <stdio.h> ... A: I recommend using the std::ostringstream class over sprintf as it is object oriented, and much ...
|
| Strings, Arrays, and Pointers | 7/15/2009 |
Q: can you help me with some questions about strings, arrays, and pointers? 1) what is the ... A: 1) A string is a name for an array of characters. Every array is a pointer (the name itself of the ...
|
| random numbers in c++ without repeating the produce numbers | 7/9/2009 |
Q: how to make random numbers in c++ without repeating the generated numbers? plsss help...ty A: If you want to create a random number in C++, there is a function called rand() that returns a ...
|
| C++ newbie | 7/7/2009 |
Q: Hey, I'm a completely new to C++, and I've been having some problems with the programs I produce, ... A: To use the std::string object, you must include <string> at the top of your file. The reason ...
|
| C++ | 7/6/2009 |
Q: I'm a C++ newbie who has a little trouble with these programs, can you help me with them? 1) int ... A: If I understand your question correctly, you want to be shown how to return values from functions ...
|
| C++ | 7/4/2009 |
Q: I'm a C++ newbie who has a little trouble with these programs, can you help me with them? 1) int ... A: I'm not entirely sure what you mean by extend the return of a value. Do you mean returning different ...
|
| C++ newbie | 7/4/2009 |
Q: Hey, I'm a completely new to C++, and I've been having some problems with the programs I produce, ... A: 1) The reason this generates a compile error is because you are trying to assign multiple characters ...
|
| C++ | 7/2/2009 |
Q: I'm a C++ newbie who has a little trouble with these programs, can you help me with them? 1) int ... A: I'm sorry for the slight delay. I had to compile your code as I couldn't see anything wrong with it ...
|
| scope? | 6/25/2009 |
Q: I’d like to ask a scope question if you have time. I have a function (function A) that creates an ... A: If you want to dynamically allocate your array inside of a multiple functions, you declare a global ...
|
| Executing a program from another program | 1/13/2009 |
Q: How to execute a program from another program? For example: i want to execute "START.cpp" from ... A: A .cpp file is nothing more than a text file. It cannot be executed by itself. You have to let the ...
|
| Design Question | 1/10/2009 |
Q: I have a system designed in excel 2003. Hosted on a windows XP pc. The system computates extensive ... A: If you want to change your application to be a plug in for Excel, I suggest using Visual Basic. It ...
|
| c++ | 11/14/2008 |
Q: Sir, I am using Turbo c++ 4.5 software and self learning c++.When I compile the following program : ... A: In C++, you cannot define namespaces within the main function. They should be defined in an area ...
|
| an array of pointers | 6/9/2008 |
Q: I know that you asked that I stay away from MFC questions, but my program has multiple edit boxes ... A: Sorry for the delay in responding, I had to refresh a little bit on MFC. I was unable to find ...
|
| Error C2064: term does not evaluate to a function taking 4 arguments | 6/8/2008 |
Q: In my code I have an array being initialized before entering a for loop and being populated in the ... A: The reason you are getting a compile error, is that it appears you are trying to invoke the ...
|
| Hi sir | 6/7/2008 |
Q: Why don't we need .h extension header file in c++? A: In C++, the spec dictates that header files have no extension. Personally, I find that to be a bad ...
|
| lValue required | 6/4/2008 |
Q: What is lValue? Some of the C++ programs I have written, have flagged an error 'lValue required". So ... A: I have often wondered why they choose this word and not something more descriptive myself. You ...
|
| Is it possible to compile 32 bit applications in 64 bit environment.. | 2/12/2008 |
Q: I have an application which was running fine in 32 bit Windows 2003 64 bit OS, Visual studio 2005.. ... A: Your application could get a link error for any number or reasons. The one I would think to be the ...
|
| iterator declaration in C++ template under gcc | 2/7/2008 |
Q: I'm need to write cross-platform code. I wrote a custom list which compiles and works fine in MS ... A: Could you please include your declaration wherever you are using this list? I'm assuming you are ...
|
| C++ | 2/7/2008 |
Q: what is static data binding and dynamic data binding ? A: Static data binding is where you assign values at compile time. Dynamic data binding is where you ...
|
| Reading commands from text file | 2/6/2008 |
Q: I am implementing a simple data structure in c++ (a stack). The problem is that I want my program to ... A: Unfortunately, there is no way to translate your custom string into an executable command. I think ...
|
| C++ | 2/5/2008 |
Q: Can over running of array lead to the catastrophic failures? If ‘Yes’ then why does not C++ provide ... A: Accessing an array outside of its bounds will always, always result in an outright, runtime crash of ...
|
| C++ compiler CL | 2/4/2008 |
Q: Somewhere I read that C++ uses the compiler CL(.exe). what i know sofar about CL is that it can ... A: cl.exe is the actual executable file called by Visual Studio to compile C or C++ code into object ...
|
| Converting a double to a string... | 2/1/2008 |
Q: I need to enter a double into an edit box. Is there a way to accurately convert a double to a string ... A: From what I understand you have a std::string called value, which contains the double you want to ...
|
| Operator Overloading | 1/29/2008 |
Q: How r u?,hope that u will be fine.Sir i have few questions: 1.First i want to know what is meant by ... A: To answer your first question, this means you are accessing an array outside of the memory allocated ...
|
| How to connect C++ application to Javascript functions? | 1/29/2008 |
Q: Good day Sir Eddie, I know that C++ and Visual C++ are a bit different but because C++ is a ... A: I've never done this before. However, I know that it can be done by writing JNI bindings that can ...
|
| Converting a double to a string... | 1/26/2008 |
Q: I need to enter a double into an edit box. Is there a way to accurately convert a double to a string ... A: Sure, C++ provides an easy mechanism for this called ostringstream. Here is some sample code: ...
|
| Problems with file handling in C++ | 1/24/2008 |
Q: Sir, I had written the following code in C++: #include<iostream.h> #include<fstream.h> ... A: The reason you are writing garbage to the file is because you are casting the address of your ...
|
| Mouse Tracking | 1/23/2008 |
Q: I'm kind of a beginner to this sort of programming in C/C , I've only done a few introductory ... A: I think you would be better off making this a standard Win32 application. It should be pretty easy ...
|
| Question regarding arrays... | 1/20/2008 |
Q: Is there a way to set/change the number of elements within an array at runtime? Everything I've done ... A: Whenever you explicitly allocate memory with new, you have to call delete to clean it up, or else ...
|
| Question regarding arrays... | 1/18/2008 |
Q: Is there a way to set/change the number of elements within an array at runtime? Everything I've done ... A: Sure, you can do that. The easiest way to allocate at runtime is with a pointer. Here is a simple ...
|
| Classes | 1/14/2008 |
Q: Sir I am Trying to solve an Assignment so ca you please tell me what is the problem with my code,My ... A: I'm not entirely sure what your problem is since you didn't specify, but I've spotted a couple of ...
|
| C++ data types.. | 1/8/2008 |
Q: i have a char variable... suppose char a; cin>>a; and I input the character '46'... is there any ... A: Sure, you can get the integer value from a character. C++ provides the object istringstream for ...
|
| Classes | 1/5/2008 |
Q: Respected Sir, I am not understanding classes so i want to learn what classes are and ... A: The reason for classes is so we can group together data that describes a particular object, as well ...
|
| c++ | 1/4/2008 |
Q: good day, i have base class ,where i have three member functions (actually abstract,no definition)in ... A: It sounds like you could maybe use a function pointer to accomplish what you want, however, if you ...
|
| file handling in c++ | 1/1/2008 |
Q: 1st of All Happy New Year Sir!...My question is about file handling i want to make a data of users ... A: It sounds to me like you need a struct for your User and associated data in code. Here is a snippet ...
|
| Verification of Algorithms | 7/16/2007 |
Q: In school, if we write a function like: "int factorial(int x) {}", they will have us verify it by ... A: What I tend to do is write extensive unit tests for methods like this that test a range of values ...
|
| about turbo c / c++ | 7/11/2007 |
Q: i want to install a turbo c compiler on xp (home edition) laptop . how can i get a free version of ... A: If you are looking for a free compiler, why not use Visual Studio 2005 Express. It is free, and ...
|
| file handling in C++ | 7/10/2007 |
Q: I have made a generic template class for 1D array.This array can be any type of inbuilt data ... A: If you want to save an array to a file, here is some pseudocode. // Open the file for writing // ...
|
| c++ compiler | 7/10/2007 |
Q: can give me a site where i can download a c++ compiler or do u have can u send me ? A: http://msdn.microsoft.com/vstudio/express/ You can paste that link in your web browser and download ...
|
| Error: Vector Subscript out of range | 7/5/2007 |
Q: I am declaring 2 vectors as vector<int> abc; vector<int> xyz; i am passing the vector "xyz" as an ... A: Unfortunately, there is no way to deduce this runtime error with actually seeing your code. Can you ...
|
| virtual constructor and destructor | 7/5/2007 |
Q: sir/madam pls explain me the following 1. Can we have "Virtual Constructors"? 2. Explain the need ... A: 1. No, you cannot have a virtual constructor. Declaring a constructor virtual will result in a ...
|
| Reading Files using file name as string | 7/4/2007 |
Q: I am storing the name of the text file in a string as string fname = "abc.txt"; string l_mline; ... A: A quick glance at your code doesn't yield any obvious errors. Can you please post the contents of ...
|
| Need of private constrctor and destructor? | 7/2/2007 |
Q: sir; pls explain me private constructor and destructor in cpp? wat is the need of it? A: There is no concept of making any method or variable private in a cpp file (there is a way to fake ...
|
| How to differentiate integers and alphabets | 1/29/2007 |
Q: I have previously asked a question on how to differentiate integers and alphabets when reading from ... A: Sorry I couldn't get to this sooner, I have been extremely busy at work. Here is what I recommend. ...
|
| negitive restrictions | 1/8/2007 |
Q: Im making a "lemonade stand " game for an infotech course. My question is when I enter a number into ... A: Onion, thank you for the question. There are a couple of ways you can do this. You could just turn ...
|
| compression | 1/5/2007 |
Q: do you know what the basic method is that compression routines like zip use? A: No, I do not. I think it's a secret, as WinZip costs money. I know that the open source engine Open ...
|
| What compiler is good | 1/4/2007 |
Q: I want a compiler, I dont care if its simple but it should have the normal tools. Im new and Ive ... A: C++ in general compiles slowly compared to most other languages. They way you write your code has ...
|
| minimum of 4 values | 9/8/2006 |
Q: Hey Eddie, This has been bugging me. How do I detect the minimum of 4 given values? This is the ... A: Your problem if the fact that you are not using else if's in your conditional statement. The ...
|
| Passing multidemensional array to function | 8/22/2006 |
Q: I need to pass at least one 2D array to a function. I'm using Dev-Cpp on Windows XP. ... A: Passing 2d arrays into functions is a nasty process, and I don't recommend doing it by pointer. In ...
|
| How to make a non-cmd prompt window? | 8/21/2006 |
Q: I know this is probably a really basic question, but I can't figure out how to make a regular window ... A: In order to make a windowed application, you have to tell Visual Studio to generate a Windows ...
|
| Creating a C Class and incorporating it into a program | 8/13/2006 |
Q: I have a problem and unforunately I need the answer to the problem very soon. I thought I would have ... A: I think you are overthinking the problem. Are you having fundamental or syntactical problems with ...
|
| Fstream->Flush() | 8/9/2006 |
Q: I had a code problem earlier but I managed to fix it using flush(). Essentially, I have to convert ... A: I am assuming that the the file stream was becoming corrupted and flush somehow forced the correct ...
|
| c programming | 8/7/2006 |
Q: please explain the difference between these 2 segments of the C code: if (a & b) flag = 0; ... A: 3 is incorrect. When you check to see if something equals a value, you use 2 equals signs. The ...
|
| Pointer and Preprocessor doubts | 8/7/2006 |
Q: I have two doubts. 1. Why the pointer to a reference is not possible. 2. How the preprocessing will ... A: 1. I think you may have not sent the first part of your question. I see no code that is pointer or ...
|
| Graphics Library | 8/5/2006 |
Q: I'm in a C++ class using visual studio.net. Were trying to create a basic RPG gam, our problem is ... A: There are 2 ways you can go about doing simple bitmap rendering. One is to use native Windows GDI ...
|
| c programming | 8/5/2006 |
Q: please explain the difference between these 2 segments of the C code: if (a & b) flag = 0; ... A: The first segment of code checks if a bitwise "anded" with be is a non zero value and assigns a ...
|
| okay....still a few problems | 8/4/2006 |
Q: ... how are you?? hope ur doin well... my questions are- 1) i tried the sleep() but the compiler ... A: 1) I don't know if this was just an oversite, but the function is called Sleep() with an uppercase ...
|
| how can i do this | 8/3/2006 |
Q: i m using windows xp....the program i m using is turbo c++Hey... i m doin a c++ project for my ... A: There is a function in Windows.h that can be used to stall the program you are writing called ...
|
| c++ | 5/11/2006 |
Q: i am a student knowing about c++ . i have learned functions ,arrays ,structures,classes,basic ... A: For mouse movement, I am afraid I only know Windows OS specific calls. The functions SetMousePos() ...
|
| Which loop is the better? | 5/11/2006 |
Q: i want to print "Hello" 100 times, Which of the following is more efficient loop? Or both are same ... A: Both of those loops do the exact same thing, in the exact same time O(n). Another way to do that ...
|
| rand() in C++ | 5/6/2006 |
Q: How can I use rand() to generate values between 100 and 500? I have been trying the following: ... A: If you rand() % 500, it could produce 497 for instance. Then you add 100 to it and you have 597. ...
|
| visual C++ | 5/2/2006 |
Q: I am able to do c++ in a editor like borland or somehting, but MS visual C++ seems to be troublesome ... A: Are you checking the box for an Empty Project when you create your Win32 Console application? Not ...
|
| C++ | 4/21/2006 |
Q: What you mean by virtual class & abstract class? A: A pure virtual class and an abstract class are the exact same thing. No instance of this class can ...
|
| Minimize to system tray | 4/20/2006 |
Q: Yeah so it will sit by the clock in the taskbar and wont take up a space next to all the open ... A: In your WndProc function, you can set up to catch you WM_SIZE event. This is sent when the window is ...
|
| Minimize to system tray | 4/20/2006 |
Q: I have been learnign C++ for sometime now and my latest application requires me to minimize the ... A: Just to make sure I understand everything correctly, you have a windowed Windows application and you ...
|
| Calculator (recursion version) | 4/18/2006 |
Q: Brief Description: User enter an expression such as "1+3+(2*5)" and the result is displayed i.e. 14. ... A: I am glad to see you are using std::strings. These can help make your life way easier with the ...
|
| Soruce code | 4/13/2006 |
Q: I'm writing a code for different types of lumber. haveing trouble figureing out how to get a running ... A: Obviously, there is not enough information here for me to help you. The goal of your program, ...
|
| Delete array of pointers | 4/10/2006 |
Q: I am having trouble with the syntax to delete an array of pointers in C++. I either get ... A: Sure, I would be more than happy to help. I was wondering if you could sent me your actual ...
|
| Difference between Overriding and Overloading | 4/5/2006 |
Q: Eddie, Thank you so much for a fast and detailed response. It helped me . I have one more doubt. ... A: Yes, your thinking is correct. Think of it like this: Overriding, say you have a base class called ...
|
| tutorials | 4/4/2006 |
Q: I'm quite a beginner at C++ and I wondered where I could find some EASY TO UNDERSTAND C++ tutorials ... A: Very good intro to C++ tutorials can be found here: http://www.cplusplus.com/doc/tutorial/ . They ...
|
| Difference between Overriding and Overloading | 4/4/2006 |
Q: Can you please explain with an example the diffrence between overriding and over loading in C++ ? A: In C++, overriding is a concept used in inheritance which involves a base class implementation of a ...
|
| graphics | 1/13/2006 |
Q: sir, could u plz tell me some good books on computer graphics to be read as a novice... as i am a ... A: The number one book for computer graphics I can recommend is the OpenGL Superbible, which is ...
|
| fstream | 12/24/2005 |
Q: If I want to make a file to save my inputs in it, like what the user enters. How do I create this ... A: Sorry it has taken so long for me to get back with you, I've been on vacation for the holidays. ...
|
| Regarding GUI interface.. | 12/24/2005 |
Q: I would like to learn about GUI interface and/or MFC programming, but I can't find websites that ... A: I am not a MFC programmer. But I have coded lots of UI's. A good website to check is ...
|
| C++ vs Delphi | 12/24/2005 |
Q: I am a high school student with reasinable knowledge of Delhpi programming for WIN32 - Language: ... A: I'm not sure how much of an explanation I can provide you with, as I have never programmed in Delphi ...
|
| how to get system date | 12/21/2005 |
Q: can u teach me the easiest way on how to get the system date? Is there a predefined function to ... A: Sure, there is a predefined function to do this for you. It is called time() and is located in ...
|
| maze in c++ | 12/20/2005 |
Q: I'm really sorry to bother you again.I just want to know your algorithm works for any mazes. if you ... A: There is no real way to be able to solve every single maze you could possibly be presented with ...
|
| file permissions and C++ | 12/19/2005 |
Q: #include <stdio.h> #include <iostream.h> int main(){ fopen("haha.txt","w"); cout << "Content-type: ... A: I actually had no idea how to do this, since I've never had to before, so I asked a coworker. He ...
|
| maze in c++ | 12/13/2005 |
Q: I'm sorry to bother you. I have a question from you. My question is about maze. One of my masters ... A: The most common algorithm to finding the exit of a maze is to move in the immediate direction you ...
|
| Reading from Standard Input | 11/7/2005 |
Q: I am trying to read from the standard input. Right now the user should enter a character and then ... A: I believe that you should take a look at the function getch(), which simply waits for a key to be ...
|
| How to make user interface in C++ | 10/26/2005 |
Q: Sir, I want to user interface using C++. But its giving error in compiling so what I ... A: Unfortunately, without more information, there is no way I can help you. What error are you ...
|
| Developer's Productivity | 10/25/2005 |
Q: I am a dotnet developer, I was working in a good company but the only problem there was the ... A: A developer's productivity is really an individual thing. One of the things I do at my job is ...
|
| cout data | 10/22/2005 |
Q: ifstream read_file("dd.txt",ios::in); int i=0,k=0; char* abc[100][100]; do{ read_file>>sen; ... A: I'm not quite sure exactly what your question is. If you want to print that subscript in your array, ...
|
| C++ | 10/21/2005 |
Q: i need help in C++...im taking the C++ course at university..some stuff i know..but sometimes i have ... A: The first problem that stands out to me is that in your while loop condition, you are using the ...
|
| Preventing user from showing Task Manager | 10/17/2005 |
Q: I want to write a program which when runs, prevents the user from launching the windows Task Manager ... A: This is an interesting question, I've never actually had to solve this problem before. What I would ...
|
| random access file | 10/13/2005 |
Q: Can you show me how to open a file for random access, write a byte value to it, read that byte value ... A: Good ole file i/o. I prefer the C methods of file reading as opposed to the C++ style file reading, ...
|
| C++ runtime error | 10/12/2005 |
Q: Whenever I try do something in a program, I get a runtime error, it comes up with a grey box with ... A: The error you have described is probably the most common error message in all of C++. I have no way ...
|
| converter??? | 10/12/2005 |
Q: good day! do you know where to find a freeware or trial-version of a "C++ to Java Converter"? can ... A: After google bashing for quit a while, I was unable to find a valid link to an app called C2J++. ...
|
| compilers | 10/6/2005 |
Q: how many kinds of compilers are there in c++? A: Wow, that's a broad question you have there. Do you mean how many different compilers are there for ...
|
| Window Icons | 10/5/2005 |
Q: ive been mesing around using C++ (with Dev C++ ide) for a while now and have noticed in the window ... A: To load your own icon, you have to pass the hInstance of the class (not NULL) and a string to the ...
|
| function overriding | 10/3/2005 |
Q: i understand that by using scope resolution operator we can call the base class function from the ... A: Function overridding is useful when you want to have multiple derived classes implementing a base ...
|
| Passing an array of names to a function | 10/3/2005 |
Q: I have thanked and rated you, but just want to ask one more question, how about a function call for ... A: To pass that array to a function, you would pass it like any other variable: family.SetName(6, ...
|
| using fout | 9/30/2005 |
Q: Am trying to get is leap information to print out in semi-table form to a text file which I can then ... A: I compiled and ran your code with Visual C++ 2003. Aside from being stuck in an infinite while loop ...
|
| Passing an array of names to a function | 9/30/2005 |
Q: Just wondering how to pass this array of strings to a function. If I have an arry as follows. char* ... A: The declaration of that array is a tad off. It should be: char *names[MAX_NAMES] = { // above code ...
|
| Visual C++ .Net | 9/29/2005 |
Q: How you doing Eddie. First, thanks for taking the time to help me out. What I want to know is what ... A: Maybe they're 2 separate things, but when people I know refer to .NET programming it is just ...
|
| c++ stack question | 9/28/2005 |
Q: i am currently in the process of writing a program using stack (in the form of an array). I was ... A: Yeah sure, I'll take a look at your code and help you all you want. There was a period for about 2 ...
|
| c++ | 9/27/2005 |
Q: i have a programming task concerned with extracting info from a set of road distances between places ... A: What part of the application is giving you difficulty? You have the set of data right? Do you need ...
|
| Data structure using C++ | 9/24/2005 |
Q: I am not sure how to pay. so let me know.I see some declined , does that mean they counldnt solove ... A: The code you have provided is very clean and concise. It adheres to the quote from the book. It uses ...
|
| Gaming Software Help | 9/19/2005 |
Q: Eddie, Thanks for the response again. Right now I am diving into Python. What I am beginning to ... A: I've played with Python a bit, but I'm far from an expert in it. Python is a high level scripting ...
|
| programming math | 9/18/2005 |
Q: i am using microsoft visual C++. I am a beginner in programming and has some problem with math in ... A: This is interesting. I just went and had this tested on both Linux and Windows, and could not ...
|
| Gaming Software Help | 9/16/2005 |
Q: Hey Eddie, Yippie! It's good to know someone else is on your side... Well, as I ssaid before I am ... A: Sorry, I don't mean to take so long getting back to you, I stay very busy with my job and college ...
|
| Gaming Software Help | 9/14/2005 |
Q: Hey Eddie, I began programming in C++ in high school. I have also done a bit of programming in ... A: I don't think I'm understanding something. I thought Blender was a free tool that was used for ...
|
| C++ | 9/14/2005 |
Q: I'm using windows XP on a laptop; is there any place where I can get the compiler, etc. for C++ at a ... A: You have a couple of options when it comes to the compiler you want. I myself prefer Microsoft ...
|
| c++ searching | 9/5/2005 |
Q: hey, how r u? I am a beginner to c++ and have a question about hash searching in C++ that i was ... A: Sorry about taking 2 days to reply, I stay extremely busy with work and graduate school. I noticed ...
|
| Drawing shapes using turbo c | 8/18/2005 |
Q: im using windows xp with the turbo c compilerHello and good day my name is Oz, and i'm been browsing ... A: Windows is my forte. If you include the header file <Windows.h> you get access to all the windows ...
|
| Since only one copy of each method is stored, what is the difference between static methods and normal methods? | 8/11/2005 |
Q: Since only one copy of each method is stored, what is the difference between static methods and ... A: Static methodsdo not have a "this" pointer. That is the primary major difference. This means that ...
|
| C++ socket programming | 8/11/2005 |
Q: I am using microsoft visual C++ 6, and i want to ask about what libraries or header files should i ... A: Sadly, this is a problem I'm facing myself. Windows and Linux are not very similar internally at ...
|
| pointers | 8/6/2005 |
Q: i have the structure hostent (built in) struct hostent { char *h_name; char **h_aliases; int ... A: Assuming your have you h_aliases array filled out with some names to be printed to the screen, ...
|
| gcc 2.95 & gcc 3.x | 7/29/2005 |
Q: why is it that sometimes something compiled in gcc 2.95 will not work in a machine that has gcc 3.x? ... A: We just had this issue at my place of employment a couple of weeks ago, porting all of our gcc3.x ...
|
| How do I create a Resources compiler? | 7/20/2005 |
Q: I'm a novice programmer. I have created a program that allows a user to create an electronic ... A: There is actually a couple different ways to go about this. What you should do is make your display ...
|
| How to draw a graphics like circle | 7/18/2005 |
Q: Sir, I am using 5.02 version of C++.I want to draw graphicslike circle or any others graphics on ... A: This is an easy problem. This is also assuming it is a Windows application. You can get a handle ...
|
| Converting int to char* | 6/26/2005 |
Q: I am using Visual C++ .NET 2003 and using MFC libraries to develope. My question is extremly easy ! ... A: There is a handy C function for just such a purpose. It can be found in the include file "string.h". ...
|
| advantages of exception handling | 6/21/2005 |
Q: 1.does C language have exception handling mechanism. if so , how ? 2. what are the advangages of ... A: The C language does not provide any kind of exception handling by default. The C++ language does ...
|
| grphics via OpenGL | 6/21/2005 |
Q: sir i have made a room using GlutWireCube();.it is looking fine.now i want to paint its walls using ... A: Now that you have your room, you want to color its walls. This shouldn't be too hard. I'm not too ...
|
| Images in C++ | 6/19/2005 |
Q: I had been using the borland turbo C for working with images with extention '.pic'. I know how to ... A: Could you please specify what you mean by interuppts? I'm not familiar with that term. Could you ...
|
| graphics via OpenGL | 6/19/2005 |
Q: sir i m going to make a project in opengl.it is a type of house.sir i m going to make one room.i ... A: Mapping textures in OpenGL isn't too hard. You must first understand how texture coordinates work. ...
|
| subclasses and hotkeys | 6/13/2005 |
Q: i would like to ask you a question about subclasses in c++ What are subclasses and do you have an ... A: A sub class is another term for a class that is derived from another class. For a visual example: ...
|
| C++ headers | 6/3/2005 |
Q: I am using Bloodshed Dev C++ 4.9.9.0 compiler and i want to know how to find the various functions ... A: Sorry about the delay, I'm usually fairly quick with answering questions but I've been very sick for ...
|
| function overloading | 6/1/2005 |
Q: I have a problem using function overloading. I have declared the folowing classes/methods: class ... A: Your problem is that your Super class has no idea that SubA and SubB derive from it. Your Construct ...
|
| Puesdo code | 5/31/2005 |
Q: I am trying to write some Puesdo code to show the design for a program that scans for the lowest ... A: When thinking about psuedo code, just think about it like you would regular code, it's really not so ...
|
| C++ Void Pointer | 5/16/2005 |
Q: I tried the Line 5 as "(int*)ptrV = &i1" as mentioned by you. But the M/S Visual Studio compiler ... A: This appears to be a compiler specific error. I believe that using the statement like this: ...
|
| C++ Void Pointer | 5/12/2005 |
Q: I have a question on C++ void pointer assignment. Lets take this Code snippet: Line 1 >> int i1=5 ... A: The way you have line 5 written should cause a warning or error on most compilers. The appropriate ...
|
| Getting Exception when reading from files | 5/5/2005 |
Q: I am using Visual Studio 6 on XP Pro (SP1 installed). I made this VC++ program to simply populate a ... A: Giving the code the once over, I'm fairly certain that it is crashing because you are casting a ...
|
| Visual C++ and Visual Studio | 5/2/2005 |
Q: My question is not technical. I am wondering what is exactly visual C++ and visual studio? what is ... A: For all intensive purposes, visual studio and visual C++ are the same thing. Visual C++ is like a ...
|
| help!! | 4/25/2005 |
Q: i have created: struct gateType { char type[5]; int input1PinOrder; int ... A: If you want to be able to directly assign a value to a string, the std::string class has the = ...
|
| dev-c++ | 4/25/2005 |
Q: i've got a problem using dev-c++ that seems so simple but i can't really understand. I've written a ... A: Although I have never used dev-c++, I can sense something is not right here. When you click the run ...
|
| enquiry | 4/25/2005 |
Q: in Microsoft Visual C++ at Projects Sections what is the meaning of ( win 32 application )? A: A win32 application is your basic application for a normal, everyday average Windows program. The 32 ...
|
| header file | 4/12/2005 |
Q: i have created 3 functions in different files (i mean different main.c files) how can i create a ... A: Sorry, but one of the language constraints of the C/C++ languages are that you can only have one ...
|
| maze | 4/12/2005 |
Q: I'm a first-year of secondary- schools student and I'm learning C++. I've got an exam tomorrow. So, ... A: This isn't too bad when you think about it. Make a char[][] that can hold the maze first off. Like ...
|
| c++ programming | 3/28/2005 |
Q: pleas tell how we can implement linklist in c++. A: Since it is not specified, I'll assume you are referring to a singly linked list. Lets think about ...
|
| explain | 3/24/2005 |
Q: Would you mind explain the "array of objects" for me? Thanks! A: An array is a way of ordering a group of variables of the same type. You used the term "objects" in ...
|
| value | 3/20/2005 |
Q: " Consider below fragment of code. Assume the integers occupy 4 bytes and that m is stored in memory ... A: Don't you just hate these tricky pointer questions? Always very meticulous and intricate. I drew ...
|
| Unicode | 3/20/2005 |
Q: I have a doubt in progrmming. I need to get unicode values of PageUp and PageDown in C/C++ How to ... A: Sorry about the delay, I have never worked with Unicode before, so I wanted to test this solution a ...
|
| class | 3/18/2005 |
Q: (c) Use C++ to show the declaration of a class square that derives from rectangle, which in turn ... A: First you start off declaring your Shape class, which would contain all of your basic properties ...
|
| about oops | 3/18/2005 |
Q: what is the definition of encapsulation? if i declare a data member as public whether it fulfill the ... A: rajesh kushwaha. Thank you for the question. In regards to programming, data encapsulation refers ...
|
| Thread | 3/17/2005 |
Q: How to write multi threaded applications in c++ Also write a program that will compile in c but not ... A: In order to write threaded applications in C++, I would highly advise that you look up the functions ...
|
| program | 3/17/2005 |
Q: can we generate c++ source code from binary file? A: Sure you can do that. The hard part is writing the parser for the binary file code. An easy way ...
|
| program | 3/17/2005 |
Q: Write a program in c and also c++ such that it will delete itself after execution? A: I'm not sure what you mean by "delete itself after execution". Are you referring to the memory the ...
|
| Virtual functions | 3/17/2005 |
Q: What are virtual functions and how to implement them in C? A: A virtual function is a C++ function that is bound to an invoking object at run time and implicitly ...
|
| unable to resolve a compiler error | 3/17/2005 |
Q: Kindly help me get out of this desperation : Here is a complete dialogue of a thread that i posted ... A: You probably won't like this answer, but I would advise you to buy the expensive Borland compiler. ...
|
| Rounding to specified decimal point length | 3/16/2005 |
Q: Want to round a double value to certain number of decimal places using Visual C++ 6.0 SP5. I always ... A: The way to round decimal numbers the easiest is to use some kind of epislilon value, but that can ...
|
| C++ vs C | 3/16/2005 |
Q: What is difference between c structure and c++ structure A: In C++, structures work the exact same way as classes do. They can have a constructor, a destructor ...
|
| .Net Programing | 3/11/2005 |
Q: First of all I hope you have a good day. How to develope a solution with multiple projects using ... A: This isn't so bad. The way I do it is to: Open the compiler. Create a new solution with ...
|
| C++ homework | 3/9/2005 |
Q: how to write a C prog change infix to postfix? with using stack ADT in standard c++ library. ... A: The STL is a great way of making any data structure problem easy. I was hoping you could be a ...
|
| MFC SetForegroundWindow() (TOPMOST) | 3/7/2005 |
Q: txs in advance for any help you can give me, this is my first time using AllExperts ... I'm having ... A: One of my friends ran into this problem a while back, and I remember that it was a real pain. He ...
|
| graphics using porland c++ | 3/5/2005 |
Q: how can i use the borland to draw multi equations ex: a1x1+b1x2=c1 a2x1+b2x2=c2 and the objective ... A: Drawing these equations shouldn't be any problem with some handy Windows GDI functions. First, get ...
|
| c++ | 3/4/2005 |
Q: Why c++ not having virtual constructor A: In C++, the only modifier you can have on a constructor is the inline keyword. Most people use ...
|
| beginning with C-please useful | 3/3/2005 |
Q: i am from greece and i just started the C language in my university, so i would only like to ask you ... A: 1. You would put the system("pause") right before you returned from your main function. I never ...
|
| checking if a string consists of all numbers or not.[Part II] | 2/27/2005 |
Q: I keep getting the following error message on the code #include <string.h> #include <iostream.h> ... A: I'm not sure why I didn't catch this earlier, probably because I was on my way out the door when I ...
|
| Data types | 2/26/2005 |
Q: That is great! Now I understand why I was getting that output. So what data type do you suggest I ... A: Unfortunately, there is no other data type that can store a floating point number that big. The ...
|
| checking if a string consists of all numbers or not.[Part II] | 2/26/2005 |
Q: last time you have given me the code int main(){ char str[] = "12345"; //would this work? ... A: For atoi, the include file is <string.h>. And yes, a char array is fine for that algorithm. So is a ...
|
| help with two problems | 2/25/2005 |
Q: I have two problems that I'm confused with so I need help during the format for both problems. The ... A: I'm not sure why you asked me, it seems you've already written the code for these. 1. float ...
|
| draw a graph | 2/25/2005 |
Q: how can i draw the graph of two non_equal linear equation if i know there objective function.i can ... A: If they told you that you cannot use MFC, then I see no reason why you can't make a standard windows ...
|
| VC++ | 2/25/2005 |
Q: ------------------------- thank u so much for ur reply sir. sir m given a class project. to ... A: I would start out first by going to http://msdn.microsoft.com and searching through the MFC ...
|
| draw a graph | 2/25/2005 |
Q: how can i draw the graph of two non_equal linear equation if i know there objective function.i can ... A: You can accomplish this very easily. Create a Windows win32 application. Create your window and get ...
|
| Data types | 2/24/2005 |
Q: I created a simple C++ class (I provided below) that would print some mathematical values such as ... A: I'm reasonably sure that the reason that is happening is because you are overflowing DOUBLE_MAX. The ...
|
| I want to do the following:
-... | 2/24/2005 |
Q: I want to do the following: - Import .MAX/.3DS file along with all its animation details - To paint ... A: This task is a difficult one. First thing you're going to want to do is research how the data is ...
|
| compiler question | 2/23/2005 |
Q: one is likely to find different compilers made by software houses. One factor of comparison, for ... A: As obvious as it may be, I would have to suggest C++ as the programming language you request, as it ...
|
| trees with c++ | 2/22/2005 |
Q: i want to make a BST"Binary Search Tree"which i can add,search,print the keys in an ascending order ... A: The binary search tree is not too difficult of a data structure to code if you understand what is ...
|
| VC++ | 2/21/2005 |
Q: can we create a paint brush application in VC++. if yes then sir how.plz tell me can i get ... A: Sure, you can create a paint brush application in C++. You might want to take a look at the ...
|
| inquiry? | 2/21/2005 |
Q: what is the famous programs which written by c++ programming language ? A: There are a number of programs writting in C/C++ that are used frequently. Any game you've played on ...
|
| Program Parking | 2/18/2005 |
Q: I would like to make a program parking for my school project. First hour is $2.00 and every hour ... A: I would be glad to help you with your project, though none of us here type your code for you. I can ...
|
| functions | 2/17/2005 |
Q: I want to know the program of some special functions in c++.please guide me to find the commands of ... A: I'm not sure what you mean by knowing "the program" or "guide" of those functions, but I'll assume ...
|
| checking if a string consists of all numbers or not. | 2/15/2005 |
Q: i was wondering if there was a way to check if a string consists of all numbers or not. i know that ... A: Though there is no function to call to directly determine if a string is all numbers or not, you ...
|
| Deskmate | 12/24/2004 |
Q: hey eddie a deskmate or screenmate...is a character that hangs around on your desktop.. check out ... A: Sure you could program something like that in C++. You can get the handle to the desktop window by ...
|
| Hey Eddie, question about a privacy problem ;) | 12/18/2004 |
Q: I don't know if you are the right person to ask about this...but here is my problem: I live with a ... A: Unfortunately, no, there is no way to change it. There's no access to the code behind it. All the ...
|
| What is the difference between 'binary numeric operator' and 'arithmetic operator'? | 12/16/2004 |
Q: What is the difference between 'binary numeric operator' and 'arithmetic operator'? Thanks, lzzzz A: I'm not sure what either of those terms mean. There are multiple arithmetic operators in C++. There ...
|
| macro expansion | 12/16/2004 |
Q: I would like to know if you know any tool or compiler setting that produces precompiled source code ... A: I'm not sure what you mean by "that produces precompiled source code file where macros are ...
|
| Recursive Problem | 12/13/2004 |
Q: I have a problem.. My program will ask the user to input any number to be squared. Basically, ... A: I'm going to have to assume this is some kind of assignment, because recursion is supposed to always ...
|
| ur answer is like opposing multi level inheritence. | 12/9/2004 |
Q: Multi level inheritence should be a cumulative thing,but your answer is opposing that. explain me?. ... A: I never said anything opposing multi level inheritence. Because the class has derived from other ...
|
| in multiple inheritence at second level of hierarchy i could nt able to access base class memeber attribute. | 12/9/2004 |
Q: #include<iostream.h> class base{ public: int i; }; class derived1: public base { public : int j; ... A: Yeah, you can't do that. This is why inheritence usually stops after the first level of inheritence. ...
|
| trouble preserving objects - pointers to objects become invalid | 12/8/2004 |
Q: I am having trouble getting objects to be preserved outside of a loop that reads data from a ... A: Yeah, the problem being that when you store the pointer to that local object, it turns to undefined ...
|
| java Vs c++ | 12/7/2004 |
Q: i am confused to choose from the most popular programming language-java & c++. could you please tell ... A: I'm not sure which of the 2 is more popular. Both are used for a wide variety of things. Java can be ...
|
| Program to determine prime numbers | 12/4/2004 |
Q: Write a program that can be used to determine whether a number is a prime number or not. implement ... A: Why you would use a class for this, I'm not sure, so I didn't bother when I was figuring it out. If ...
|
| split string | 12/2/2004 |
Q: sir i want to split this string 200.0.0.90-200.0.0.223 by hiphen (-) and store it in two seperate ... A: You're not going to be able to make any kind of function out of this process. You need to know the ...
|
| what is data binding | 12/2/2004 |
Q: sir, I have some doubts in C++.Now i am sending some of the questions. 1)what do u mean by ... A: Number 1: By data binding I'm assuming that means storing data in a variable. I'm not familiar with ...
|
| split string | 12/2/2004 |
Q: sir i want to split this string 200.0.0.90-200.0.0.223 by hiphen (-) and store it in two seperate ... A: This problem turns out to be really simple when we use a function called "strtok()" which resides in ...
|
| About oops | 12/2/2004 |
Q: I have again some questions. 1) what is the difference between object oriented programming & object ... A: For your first question, again, I'm not sure what you mean when you say object based programming. ...
|
| about memory allocation& virtual pointer | 12/1/2004 |
Q: 1) what is virtual pointer and virtual table in c++. what does the virtul table contain. 2)if a ... A: For your first question, I'm not sure to what you are referring. Perhaps these terms are specific to ...
|
| converting to vb | 11/30/2004 |
Q: but my problem is with this line of code: g_no -= g_days[i]+(i==1 && leap); "g_days[i]" is ... A: The expression (i==1 && leap) is either going to yield true or false, which is defined in the ...
|
| converting to vb | 11/29/2004 |
Q: i need to convert a C++ code to vb, i have problem with this part of the code: ******************** ... A: Although this question should have been refered to the Visual Basic section of this site, I happen ...
|
| initializations | 11/29/2004 |
Q: I have a few small questions about type initializations in C/C++: - When I want to initalize a ... A: Initializing a string like this: char szString[30]={'\0'}; is fine. You could also do the ...
|
| I have the following problem... | 11/27/2004 |
Q: I have the following problem : i am trying to output to the screen a matrix of colored points, ... A: It takes a couple of steps to render a loaded bitmap on the screen. Also, when you say "redraw the ...
|
| C++ compiler | 11/26/2004 |
Q: I have been downloading several tools to help me build C/C++ programs, although none seem to work ... A: After the download of all the Borland files are complete, there should be some sort of .exe file in ...
|
| Win32 WinProc - wParam | 11/25/2004 |
Q: I am doing Win32 programming. I read the message from this argument wParam. I type lowercase letter ... A: Sorry it has taken me longer than normal to get back to you, I spent all last night and some of ...
|
| C++ | 11/24/2004 |
Q: I have a serious problem, PLEASE HELP! I have a test on the 29th, and I cant for the life of me ind ... A: Defining your function is dependant on a number of different things, but, most importantly, what you ...
|
| Win32 WinProc - wParam | 11/24/2004 |
Q: I am doing Win32 programming. I read the message from this argument wParam. I type lowercase letter ... A: The easy way to do this is the following in the WM_KEYDOWN message in your WinProc: // in the ...
|
| Basic Win32 Window | 11/23/2004 |
Q: I am using Windows XP Pro, and I use Microsoft Visual Studio.NET 2003 and Visual Studio 6. I tried ... A: In order to do this, you should use the CreateWindow function will the following parameters: ...
|
| mpg | 11/21/2004 |
Q: I can figure this out as a math problem but I can't seem to write it as a program. I know I asked ... A: Programming this is no different from the math problem solution. It's the same forumla and ...
|
| C++ | 11/18/2004 |
Q: http://www.cs.ucla.edu/classes/fall04/cs31/ I have been working on a C++ project for the past 5 ... A: My best advice to you would be to read the strings from the keyboard into an array and tokenize it ...
|
| running a thread at a specific time in C++ | 11/18/2004 |
Q: I just have one simple little C/C++ question for you. I'm writing some code that has multiple ... A: Well, in Windows I know to retrieve system time you call GetSystemTime() and pass it a pointer to a ...
|
| coins | 11/16/2004 |
Q: I need help with this program I thought I could at least get it started but it just is not making ... A: Perhaps you are overthinking the problem here. All you really need to do to give the impression of ...
|
| percentage | 11/15/2004 |
Q: I've written a program for averaging lists of exam grades before but throwing in a percentage is ... A: I don't know if you formatted the code like that to make it more readable, but a lot of your syntax ...
|
| to draw lines | 11/15/2004 |
Q: in my computer while i run a program to draw a line or any graphics program the message is: device ... A: I would highly suggest going to the website of whomever made your video card and downloading all the ...
|
| c++ | 11/15/2004 |
Q: how to write a program in c++ to combine two strings and another to reverse the string A: This isn't all that hard of a task thanks to a function called "strcat" which resides in string.h. ...
|
| syntax to access member data with iterators | 11/13/2004 |
Q: I'm having a hard time figuring out how to access member data or functions with iterators. As in I ... A: You almost had it here. You can think of the iterator as a double pointer. It is a pointer to the ...
|
| c++ | 11/10/2004 |
Q: c++ code to print triangle, pyramid, parallerogram, using star **** ... A: This is actually a very easy problem to solve. For the triangle I'll show an example: cout << ...
|
| graphics | 11/8/2004 |
Q: How can we display bitmap pictures in the program output? A: To display bitmaps on screen, in what I'm assuming is a Windows application, the function ...
|
| How to Compile | 11/7/2004 |
Q: I have been downloading several tools to help me build C/C++ programs, although none seem to work ... A: I have determined that what you should do is go to this link: ...
|
| memory leaks | 11/5/2004 |
Q: I am writing quite a large program in C++ that runs continuously and unfortunatley has some huge ... A: From what you've said, I came across a couple of things that could be the cause. As you state that ...
|
| inheritance | 11/4/2004 |
Q: When we inherit a base class with access modifier PRIVATE. Q-->Is its private data members is ... A: To answer your question, I had to do a bit of refreshing myself. No, private members are not ...
|
| Disabling(or controlling) write click | 10/26/2004 |
Q: I have written a program in which I have used Macromedia Flash Player Component. The problem is that ... A: If you need to take care of that in flash code, I have no clue how to do that, because I don't know ...
|
| Deadlock Detection program in C++ | 10/25/2004 |
Q: I am having trouble figuring out ohow to construct the following C++ program based on these ... A: I'm not sure exactly what you mean by detecting a deadlock. What you can do to prevent data ...
|
| C++ | 10/23/2004 |
Q: When a user enters a number, for example stock number, how do you ensure that the first digit is not ... A: To ensure this, it just requires a little bit of error checking: // in main int num; cin >> num; ...
|
| using DLL in C | 10/19/2004 |
Q: I write C program. How can I reference a DLL and using its function. Could I have a simple example ... A: I was wondering if you could maybe be a little bit m ore specific in regards to your question. What ...
|
| Building problem - Visual C++ 6.0 | 10/14/2004 |
Q: I am new with using visual C++ 6.0, so i tried to build the following hello world program: #include ... A: What happened was that when you created the project, you made it a Windows application instead of a ...
|
| timer | 10/12/2004 |
Q: how do i put a timer in a progrom like for computing for its efficienct im using microsoft visual ... A: Use the function GetTickCount() which can be found in Windows.h. It returns a DWORD that is the ...
|
| Projection Histograms. | 10/12/2004 |
Q: I am currently developing a project about image processing, i've a particular question to ask to ... A: Yeah, I'd better take a look at that article, since I have no idea what you are referring to. We ...
|
| forloop | 10/7/2004 |
Q: respected sir, pls sir can you give details and more info about forloop A: If it's general knowledge about the for loop you want, I will be more than happy to provide some ...
|
| Read file | 10/5/2004 |
Q: i still have some doubts here...after reading 10 numbers from the num.txt, i try to list out all the ... A: The reason that your above code isn't working is because you are incrementing your counting variable ...
|
| Read file | 10/4/2004 |
Q: I have tried the following but 3 errors occur, please explain how to resolve the errorsˇ.Thanksˇ ... A: Sorry about that earlier. I was in a hurry when I answered. To get rid of the first and second ...
|
| Read file | 10/4/2004 |
Q: can you tell me how to Read a number field in a sequential file so that i can sum up this number in ... A: I prefer the good ole C way of file i/o. If you are trying to read in a bunch of numbers from a ...
|
| String Function | 10/3/2004 |
Q: I was asked to do this program using functions from the string.h file. Any suggestions? Make a ... A: I was hoping you could be a little bit more specific for me. According to what you say the program ...
|
| Double dimension ARRAY | 10/2/2004 |
Q: Please help me solve this program of Double Dimensional array in C++. WAP to generate a 3 by 3 ... A: Since this appears to be a simple problem from lack of clarity, I'll just go ahead and solve it. ...
|
| split a linked list into two linked list | 10/2/2004 |
Q: I inserted the function and with some modificatiion for the purpose it did work. I am coverting ... A: I see a couple issues with your code logic up there. The first being that you are setting an entire ...
|
| follow up to string manipulation | 9/29/2004 |
Q: Your previous answer was very helpful and it did solve the problem. But I have trouble ... A: I think that you are overcomplicating your problem here. You take input from the user, then print ...
|
| string manipulation | 9/28/2004 |
Q: For the following program, I understand how to use strlen(), but I couldn't print out a string with ... A: This is not actually that difficult if you think about it. Something along the lines of: // in main ...
|
| linking error | 9/28/2004 |
Q: it's me again soor to trouble u again! i have tried deleting the whole stuff and reinstalling it. ... A: This isn't ANSI standard C++. Your main should return an int(0), and clrscr() as far as I know isn't ...
|
| linking error | 9/27/2004 |
Q: i use a turbo editor to write c/c++ programs. i did not use the compiler for a while. But now when ... A: What kind of program was this that needed to link to an object file? As far as whats going wrong, I ...
|
| Writing Boggle Type Game? | 9/26/2004 |
Q: Let me start by telling you what I am looking to do. I want to create a boggle game to run on a LAN. ... A: As far as the fast calculating at the end of the game, that shouldn't be a problem with processors ...
|
| background | 9/26/2004 |
Q: I've written an extremely small C++ program in Borland 4.5 that I want to run constantly on my ... A: I think I have the answer you're looking for. Call the function ShowWindow() as follows in your ...
|
| pictures | 9/26/2004 |
Q: can we add pictures from disk to a running c++ program , ? can we play music in backgrond in c++ ? ... A: Yes, you sure can. Take a look at a function included in Windows.h called LoadImage(). You would ...
|
| For Loop | 9/25/2004 |
Q: Using C, I was asked to use For Loop to calculate the answer for the sum of 1 + 2 + 3 + 4 + 5 + 6 + ... A: The following code snippet should help you out and get you pointing in the right direction: // in ...
|
| C++ vectors | 9/24/2004 |
Q: I'm learning C++ by myself and have a problem with vectors. If we use one-dimensional array instead ... A: The reason your vector is printing out all zeros is because that when you call createvector(), you ...
|
| full-screen Mode | 9/24/2004 |
Q: I want to display a photo in full-screen mode in my program. Currently I maximize my form and in ... A: If this is a windows application, theres a couple of techniques to do this. To get rid of the ...
|
| I need to make a program using rand() | 9/22/2004 |
Q: I need it ASAP! I use unix ftp A: This problem is actually a simple one. The following code should help you out some and get you on ...
|
| C++? | 9/16/2004 |
Q: I am a 16-year-old student, and I'm in my junior year. Our computer teacher in school has decided to ... A: I'll try my best. 1) C++ is a programming language that is built around the concept of object ...
|
| Flicker in an MFC-based program | 9/16/2004 |
Q: I do call Invalidate then UpdateWindow to force a repaint and the parameters (I'm reasonable sure) ... A: Unless this is a huge project, I would highly suggest not getting involved with DirectX unless you ...
|
| Passing file pointer to a constructor | 9/16/2004 |
Q: #include <iostream.h> int z[10]; char x[10]; FILE *f1; class rama { int *integer; ... A: How about passing the valid FILE pointer to the constructor as a parameter. Once in the function ...
|
| C++ Builder GUI Panels/PNG files | 9/15/2004 |
Q: I am using C++ Builder 6. I want to use panels that have rounded off corners.. The stock components ... A: Well, I hope I wasn't misleading earlier. I've never really worked on anything that wasn't with the ...
|
| C++ Builder GUI Panels/PNG files | 9/15/2004 |
Q: I am using C++ Builder 6. I want to use panels that have rounded off corners.. The stock components ... A: I'm not sure if a PNG file will manually stretch in whatever program. I do know you can stretch it ...
|
| General_Info | 9/14/2004 |
Q: there is a kind of command_buttons that have this ability that if they are appearing in windows ... A: 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 ...
|
| Flicker in an MFC-based program | 9/14/2004 |
Q: I'm using VC++.NET (though the program was started on VC++6) and have a major problem with what I ... A: Three things come to mind that could be the cause. Are you BitBliting in the OnPaint function from a ...
|
| accessing the documents of ms-office | 9/13/2004 |
Q: how we access our components of ms-office (ie. documetns of ms-word,acess,etc)with the help of ... A: The way you would open any other file would be my guess. Something like this: FILE *pFile = NULL; ...
|
| What is difference, | 9/13/2004 |
Q: Sir, I am studying BSCS in Pakistan.I heard and stduying about C++.What is the difference among C++ ... A: You can write a database in C++. I'm not sure what you mean by C++ database. C++ is designed more ...
|
| C++/Visual C++ | 9/12/2004 |
Q: What is the difference between c++ and visaul c++? I know that c++ has the portability and all so if ... A: Visual C++ is the term for using Microsoft's IDE, Microsoft Visual Studio. There is no difference ...
|
| Resizing flash movie ... | 9/11/2004 |
Q: I have imported the "ShockWave Flash" ocx in my program. I assign it a movie. When my program is ... A: As for Flash, I do not know anything about it whatsoever. But, I have an idea I thought might help. ...
|
| Automatic directory list | 9/10/2004 |
Q: I am making a C++ Program which will automatically detect directories of any drive including ... A: The following Windows functions should be useful to you: GetLogicalDrives() SetCurrentDirectory() ...
|
| c++ | 9/6/2004 |
Q: ya i think its great thanks,plz tell me the concept in detail.i am an average c++ programmer n i ... A: Glad you liked it. Its really actually very easy. start of with something like: enum ACTIONS ...
|
| c++ | 9/5/2004 |
Q: i am an average c++ programmer n i have to do a minor project in my prefinal yr.plz suggest any ... A: Why not program a finite state machine to simulate artificial intelligence. Its really not that hard ...
|
| virtual constructor | 9/4/2004 |
Q: Can u explain me, when should i use virtual constructor/destructor, how are they advantageous over ... A: As far as common practice, when you inherit from a base class, make both the destructors virtual. ...
|
| Learning Curve | 9/3/2004 |
Q: Um, I'm kinda confused. I've learned the C++ programming and I'm a beginner towards the game ... A: As it turns out, I have a degree in game design so hopefully I'll be able to clear a lotof this up ...
|
| the difference between turbo c++ and borland c++ | 9/1/2004 |
Q: sorry for taking your time. I am a beginner in c++ programing. my OS is win XP professional. would ... A: I think the only differnece is that the Borland compiler is free. I use Microsoft Visual Studio.NET ...
|
| C++ word validation | 8/30/2004 |
Q: hey Eddie: I facing a problem how to validate text from file. For example: one line in the ... A: I know the quick and easy way to do this one. Open the file with a FILE pointer. Read all the ...
|
| linked lists & file handling | 8/30/2004 |
Q: How to read a linked list from a file into another link list? A: I would start by making a temporary linked list that holds the node values you read from a file. ...
|
| the best programming language | 8/28/2004 |
Q: I know a little basic lang. but i want to learn only one the best progamming lang. are you recommand ... A: Although some people prefer Java because its "prettier" than C/C++, I vote for C++ as the best ...
|
| C++ | 8/28/2004 |
Q: I'm wanting to get serious about programming and I've chose to go with C++. What IDE or compiler ... A: I would highly suggest using the Microsoft Visual Studio.NET for academic use. This is free on the ...
|
| absolute coordinate of mouse pointer ... | 8/27/2004 |
Q: I want to write a program which tells me the (absolute) coordinate of where the mouse is clicked ... A: If you make a POINT object and pass it to the function GetCursorPos it will fill out the structure ...
|
| HWND of where the mouse is clicked on ... | 8/26/2004 |
Q: I want to write a program which is capable of giving me the handle(HWND) of where the mouse is ... A: My experience in C++ has been graphics and math related stuff. I make video games. I've never heard ...
|
| how to pass paramters from c++ program to a macro | 8/25/2004 |
Q: I have a C++ program which runs a few macros, i need it to pass the username, pwd and another ... A: First off, lets define a macro to use an an example here. There is a couple different ways to do ...
|
| floating point arithmetics in OpenGL | 8/21/2004 |
Q: I have problems with floating point numbers. We have been preparing functional tests for OpenGL API ... A: I have always used 0.00001f as my epsilon value. Works well enough. The algorithm I use for ...
|
| 1)Inserting \showing graph 2)making run\stop button | 8/19/2004 |
Q: In c++(using dot net &MFC), how can I: 1)Showing "regular" X-Y graph which depending on the results ... A: For graphing in the window, since you are using MFC you can call a function called SetPixel. Its a ...
|
| c | 8/19/2004 |
Q: what is NULL actually? whan does the error Lvalue required occure? A: NULL is a #define set to 0. You can gain access to it by including <Windows.h>. To me personally, it ...
|
| 1)Inserting \showing graph 2)making run\stop button | 8/18/2004 |
Q: In c++(using dot net &MFC), how can I: 1)Showing "regular" X-Y graph which depending on the results ... A: I'm not sure I understand what you mean by: Showing "regular" X-Y graph which depending on the ...
|
| imapi.bin | 8/14/2004 |
Q: I get a recurring error that needs to be debugged. ... A: I'm so sorry it has taken so long to reply. I still have no power from hurricane Charley. It ...
|
| A question about new operator | 8/14/2004 |
Q: Suppose that I define an array of a class in this way: ClassName arr = new ClassName[100]; How can I ... A: I'm so sorry it has taken so long to reply. I still have no power from hurricane Charley. It ...
|
| Moving Shapes | 8/12/2004 |
Q: I am trying to write a program to get a circle to move on a form .I have set the ball moving from ... A: As opposed to Java, in C++ there is not default event handler for key presses. The function ...
|