| Subject | Date Asked |
|
| random number | 11/19/2009 |
Q: i have a problem, i have made a dice game witch picks a random number. but the random number only ... A: Mathias. It is desirable that the random number generator is seeded with the time value. What I ...
|
| c fuction | 11/13/2009 |
Q: sir when i make program of any function in c i found error "function should have a prototype" i work ... A: Ashutosh. A function prototype is simply the line that defines the function and its parameters. ...
|
| Programming | 11/9/2009 |
Q: can you please help me with this algorithm? "Generate random numbers between 0 and 1" I think I ... A: Michael. You are correct that you need to use the rand function. The basics of rand are pretty ...
|
| c++ | 11/8/2009 |
Q: could u pls help mi.my onli problem is the Type.i do knw which part of the code is wrong.i dun knw y ... A: Alissa. You are almost there, you just left out a couple of things. First, in the "setCustomer" ...
|
| C++ | 11/7/2009 |
Q: In each every programme,after pressing ctrl+F9 for compilation errors are -Unable to include ... A: Somewhere in your IDE, there should be settings to tell the compiler where the basic libraries and ...
|
| 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: Smita. The difference between these two types of allocation are where the memory comes and how ...
|
| c++ querry | 10/8/2009 |
Q: why the output of 400*400/400 is 72 A: Anuj. The problem is that the calculation is being performed using shorts (2-byte numbers). The ...
|
| recurser | 10/7/2009 |
Q: Good day,,my problem is: use recursion to write a program that returns the factorial of any number ... A: Isheen. The factorial of an integer (non-negative) is defined as the product of every positive ...
|
| C++ Time-in and Time-out problem | 10/6/2009 |
Q: Good day Sir. I want to make a simple Daily Time Record system. I need to know how to input the ... A: Josef. To format the numbers, you'll want to use printf: printf("Time worked -- %02d:%02d", ...
|
| copy constructor | 9/29/2009 |
Q: I want to know as when we have to use the copy constructor in the program code .. Thanks Srikanth A: Srikanth. You need to create a copy constructor when your class uses dynamic memory. The default ...
|
| hi | 9/23/2009 |
Q: can you explain in detail arrays and pointers?like examples how to do them A: Raymond. I'll start with arrays and then transition to pointers. An array is a collection of a ...
|
| pointers | 9/16/2009 |
Q: . can you help me answer with this please.. array of student score declared as dynamic data ... A: Sean. Honestly, I'm not even sure you need any help on this one. The code you have provided does ...
|
| hi | 9/13/2009 |
Q: for loop while loop do .. while loop if statement if..else statement nested if statement counter ... A: again, Raymond. I'd be happy to help you understand these concepts. I'll start with the if and ...
|
| sir | 9/10/2009 |
Q: Please explain “In a binary tree of n nodes there are n+1 null pointers representing children” A: Mala. This is just a stated observation about a property of binary trees. I assume you are ...
|
| fscanf equivalent in c++ | 9/9/2009 |
Q: Joseph Moore, how are you...I've been confused how Im going to convert the following code into ... A: Johnny. Below is the code, completely converted to C++. I converted the console output and file ...
|
| c++ strings | 9/5/2009 |
Q: I'm trying to do a programm that reads a file, which has this format : each line as a number and a ... A: Gong. You are on the right track here. Your idea is solid, and exactly what needs to be done, ...
|
| fscanf equivalent in c++ | 9/3/2009 |
Q: Joseph Moore, how are you...I've been confused how Im going to convert the following code into ... A: Johnny. All file I/O code that is written in C should run just fine in C++, too. In fact, ...
|
| concept of heap | 9/1/2009 |
Q: im a BS-information technology student.i have a problem with my assignment.im going to report our my ... A: The heap is the pool of memory shared by all applications and used for dynamic memory allocation. ...
|
| c++ | 8/31/2009 |
Q: could u pls help mi,i need your help.i don't knw which part of the code is wrong.i can't seems to ... A: Isabella. You are so, so, so very close with your code. The first thing you need to do is to ...
|
| hi | 8/30/2009 |
Q: hi i would like to ask was learning c++ hard at first or easy?would you get the hang of it or takes ... A: Raymond. Make no mistake: learning any programming language takes time. The first language is ...
|
| hi | 8/26/2009 |
Q: hi i wanna know what thing should i expect form learning programming and difficulty should i read ... A: I firmly believe that anyone can learn to program. Some people have an easier time of it, but ...
|
| C++ program | 8/25/2009 |
Q: hey, am in 12th grade..we have to do this computer science project.. and i am thinking of doin an ... A: Revathi. Generating and solving Sudoku is a somewhat tricky prospect, just so you know. There is ...
|
| C++ header files | 8/22/2009 |
Q: I have knowledge on how to program in java and have been trying to learn c++ over the internet. when ... A: Jeremy. A header file is basically just a way of splitting (mostly) the declarations from the ...
|
| CLR | 8/21/2009 |
Q: Hey, Joseph, thanks for the answers last time, can you help me with this bunch of questions? 1) What ... A: Angela. I love that you number your questions. It makes it so much easier to differentiate the ...
|
| program samples | 8/15/2009 |
Q: Ok here are the programs I came up with. // Hello World! Program #include <iostream> using ... A: Tristen. OK, the first two programs are exactly what I was looking for. Well done. One thing I ...
|
| Programming for dummies? | 8/13/2009 |
Q: I have absolutely no experience in any programming language or even anything remotely close to it. ... A: "The values of the columns Size and Range depend on the system the program is compiled for. The ...
|
| Programming for dummies? | 8/13/2009 |
Q: I have absolutely no experience in any programming language or even anything remotely close to it. ... A: Tristen. I firmly believe that absolutely anyone can learn to program. However, some people are ...
|
| Programming for dummies? | 8/13/2009 |
Q: I have absolutely no experience in any programming language or even anything remotely close to it. ... A: Tristen. You can absolutely learn everything you need from online tutorials, but that is going to ...
|
| struct and class | 8/13/2009 |
Q: I know how to program with java and decided to learn c++. When i did some reading on c++ i came ... A: Jeremy. Going from Java to C++ is mostly an easy prospect, but there are indeed some... ...
|
| 64-bit compilation | 8/12/2009 |
Q: I have written this code: #include <iostream> #include <string> #include <vector> #include ... A: OK, I compiled a debug and a release version. I didn't have to touch the source code at all, and I ...
|
| Doubts regarding C software | 8/12/2009 |
Q: Is it possible to create softwares with C or C++ program?If possible if I have to create a software ... A: Visual Studio is an IDE (Integrated Development Environment) for a number of languages. Visual ...
|
| 64-bit compilation | 8/11/2009 |
Q: I have written this code: #include <iostream> #include <string> #include <vector> #include ... A: Visual Studio Express edition does not include 64-bit compilation, you are correct. There are ...
|
| Doubts regarding C software | 8/9/2009 |
Q: Is it possible to create softwares with C or C++ program?If possible if I have to create a software ... A: Vivek. It is indeed possible to create software with C/C++. In fact, that's the whole reason that ...
|
| C# and C++ books | 8/9/2009 |
Q: I am an expert in plain C language mainly used in embedded systems. Took object oriented prgramming ... A: Hey, Bob. If you're looking to design Windows applications, I suggest you start by learning the ...
|
| c ++ programing | 8/9/2009 |
Q: respected sir............ is it possible to show our output from right-side of our output screen? ... A: Hiren. I'll start by saying that it's possible to do pretty much anything you want when ...
|
| C# and C++ books | 8/8/2009 |
Q: I am an expert in plain C language mainly used in embedded systems. Took object oriented prgramming ... A: Bob. This is a tough question to answer, honestly. When it comes to learning a new language, ...
|
| code for output | 8/6/2009 |
Q: i want the code for following outputs 1 1 1 1 2 2 2 2 3 3 3 3 and also for 4 4 3 ... A: Here are simple functions to print what I believe you are asking for (it is a little unclear in the ...
|
| dynamic allocation | 8/3/2009 |
Q: How are you? I know how to declare dynamically an array of objects of class MyClass: MyClass ... A: Andres. Your code: MyTree **array1 = new MyTree *[1001]; for(i=0; i<1001; ...
|
| dynamic allocation | 8/2/2009 |
Q: How are you? I know how to declare dynamically an array of objects of class MyClass: MyClass ... A: Andres. You would indeed use a for loop and the delete operator. It would be something like this: ...
|
| include file | 8/2/2009 |
Q: Why is Turbo C++ not able to find any of my #include files? A: Arianne. It's been many years since I've used Turbo C++, and I really don't remember how the setup ...
|
| dynamic allocation | 7/31/2009 |
Q: How are you? I know how to declare dynamically an array of objects of class MyClass: MyClass ... A: Andres. If you want the memory to be contiguous, then you'll need to allocate a 1D array and use ...
|
| source code | 7/31/2009 |
Q: I have a .exe file that I have lost the source code for. Ive tried decompiling it with a number of ... A: Michael. As far as I know, there is no such thing as an assembly to C++ converter. It would be ...
|
| Classes and Objects | 7/29/2009 |
Q: I wrote a program to calculate the hypotenuse of given right triangle and its 2 sides using classes, ... A: Angela. The problem with your triangle code is that you're assigning base to i and height to j, ...
|
| compiler flags to compile SSE2 code | 7/27/2009 |
Q: I have obtained SSE2 code, but cannot compile it! I was told to use the -msse2 flag for g++ to ... A: I don't have the Express Edition installed, but it should be about the same as the Professional ...
|
| incrementing | 7/26/2009 |
Q: What is the difference between p++; ++p; Can you please give me an example and tell me how each ... A: Mandy. These operators are referred to as postfix and prefix operators, respectively. There are ...
|
| Programming difference | 7/24/2009 |
Q: I'm a C++ newbie currently taking the C++ Beginneer's guide. I'm approaching the end of the book and ... A: Hey, Angela. As I mentioned in the question that you sent me directly a few days ago, coding style ...
|
| Dynamically allocate 2d array of pointers to objects | 7/23/2009 |
Q: It's been a long time since I've done any programming in C++ (been doing Java for the past several ... A: Kevin. In C++, the value of the allocated space is undefined until it is defined by you. So, if ...
|
| pre/post operators | 7/23/2009 |
Q: I just did a simple program trying to show the difference between the use increment and decrement ... A: Angela. Remember that the prefix and postfix operators occur based on the entire line of code, not ...
|
| 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: Bita. All this really means is that when you have default arguments, the parameters they apply to ...
|
| allocation | 7/17/2009 |
Q: I have this loop in my program where I repetedly create an array of pointer to class MyTree ... A: Eric. Without further context as to what happens in the loop and what exactly a MyTree class ...
|
| Data Types | 7/16/2009 |
Q: Hey, Joseph, thanks for your detailed answer last time, they were really helpful. I got some more ... A: 1. Default arguments can be supplied in the prototype or function definition, but they must be ...
|
| Functions | 7/15/2009 |
Q: 5) argc is an integer that displays the number of arguments on the command line, what does it mean ... A: Wow, another bunch of questions! :) 5. When you execute a program, you are calling a command-line ...
|
| Follow up | 7/15/2009 |
Q: so the ? was this one that i needed you to assist me in getting the codes. A. Given the following ... A: OK, here's an implementation of this. Look it over. I'm sure you'll have some questions about some ...
|
| Pseudo code | 7/13/2009 |
Q: Please help me B. A user has given you the following pseudo code for a task he has to perform a. j ... A: We'll start here: ----- A programmer is trying to write a program that adds corresponding elements ...
|
| Pointers | 7/7/2009 |
Q: Hey, I'm having some trouble understanding the pointer, can you help clarify, thanks? 1) Assuming ... A: Angela! I'm happy to help you with pointers. I love pointers. :) 1. When you dereference a ...
|
| Pseudo code | 7/7/2009 |
Q: Please help me B. A user has given you the following pseudo code for a task he has to perform a. j ... A: OK, you took my given code a bit too literally. I was showing you examples of specific bits of code ...
|
| C++ Switch | 7/1/2009 |
Q: these questions are regarding C++ switch statements. First of all, is there a fundamental ... A: Essentially, the best way I can describe a switch statement is that the case statements are the ...
|
| C++ Switch | 6/30/2009 |
Q: these questions are regarding C++ switch statements. First of all, is there a fundamental ... A: Wow, that's a lot of questions! :) Ok, here goes: Switch statements and if/else if blocks perform ...
|
| counting the strings | 6/30/2009 |
Q: good day,pls help me with my problem in c++ i'm currently making a program on how to count the ... A: I don't fully understand what you are asking for, so if I do not answer your question in full, ...
|
| scope question | 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: Eric. Scope is absolutely the right word to use here. The problem you're experiencing is that the ...
|
| c++ | 6/7/2009 |
Q: explain me about abstract class with an exmple please. A: Ravi. An abstract base class is a class which contains one or more functions with no implementation ...
|
| data structures | 5/27/2009 |
Q: How are you? Thank you very much for taking questions. I am experimenting with linked lists and ... A: Andres. Hopefully I can answer your questions here. Traditionally, linked lists and other similar ...
|