| Subject | Date Asked |
|
| C++ file handling | 11/17/2009 |
Q: e keyword) stored in one file with the program stored into another file .But the probelm is that i ... A: These are not standard c++ headers #include<stdio.h> #include<conio.h> #include<process.h> ...
|
| vectorized MD5 | 11/15/2009 |
Q: I wasn't sure if I needed to message you before you could message me for the last question. And I ... A: I haven't looked into it as yet. I was under the (perhaps mistaken) impression that it was not ...
|
| A question about bank transactions | 11/15/2009 |
Q: first of all I would like to apologise that I am writing to you a private message. But I believe ... A: Yes, that should be fine. One issue that you may want to address is that of concurrency - if many ...
|
| A question about bank transactions | 11/15/2009 |
Q: first of all I would like to apologise that I am writing to you a private message. But I believe ... A: The structure of your client code is: 1. create a socket => sock = socket( AF_UNIX, SOCK_STREAM, 0 ...
|
| what is wrong with this? | 11/14/2009 |
Q: i am not sure but could it be that i already deleted the memory to store the object cuz i cant ... A: The function int neg(dyna ob) takes its parameter by value, it gets a copy of the ...
|
| what is the difference between this two? | 11/13/2009 |
Q: please, here is a working code that displays the binary bit pattern, byte by byte using a union. ... A: here is a working code that displays the binary bit pattern, byte by byte using a union. Well, the ...
|
| RichEdit 5.0 | 11/10/2009 |
Q: I have a programmer who is developing a C++ for me and is doing it in an older version of RichEdit ... A: The versions of Rich Edit included in the Microsoft Windows distribution are freely reusable; their ...
|
| Im lost | 11/9/2009 |
Q: I have taken an online course and thus found out for myself that im not all that good with ... A: your masterpiece has most of the things correctly done, except change #include < iostream > to ...
|
| c++ | 11/8/2009 |
Q: could u pls help mi.i will be so greatly appericated for all the help frm u.my problem is tat i do ... A: You need to validate that the string balanceText contains a valid positive number. Write a function ...
|
| 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: In the function Customer::setCustomer, you need to accept the CustomerType and set the member ...
|
| Perfect Number | 10/22/2009 |
Q: A perfect number is a number which sum of all its divisors equals the number. for example for 6, we ... A: A Mersenne number is a positive integer that is one less than a power of two. That is, a number of ...
|
| Reference operator | 10/20/2009 |
Q: Can you please tell me "importance of returning reference in operator overloading ? with example" ... A: Functions can be declared to return a reference type. There are two reasons to make such a ...
|
| C program | 10/19/2009 |
Q: i have a code running but i want to know, how do i run the program and in the end it asks the user ... A: Put the code for your program in a simple loop, which repeats if the user answers 'y' to the ...
|
| vectorized MD5 | 10/19/2009 |
Q: Sorry. That was a stupid oversight on my part. The code is here: ... A: You need to write a main() function, and the linker error will go away - something like this. Not: ...
|
| Software Design | 10/19/2009 |
Q: What makes for good software design? A: This is a really open-ended question, isn't it? Somewhat like "What is the meaning of life?". A ...
|
| hi | 10/17/2009 |
Q: #include <iostream> #include <cctype> #include <iomanip> #include <cstdlib> can you explain what ... A: #include is a preprocessor directive. As the name implies, the preprocessor operates on the source ...
|
| classes in C++ | 10/12/2009 |
Q: I would like to ask you please about classes in C++. I'm trying to basically work with two classes ... A: Ok. This is homework, isn't it? I'll help you get going, but you really need to try and complete ...
|
| Memory allocation | 10/8/2009 |
Q: Can you please clarify me what are diff segments? what are the variables stored in these segments? ... A: C++ does not specify anything about 'segments', 'RAM', 'ROM' etc. However, in practice, segments and ...
|
| Memory deallocation | 10/7/2009 |
Q: i have one basic doubt , in C++ we will delete the dynamically allocated object but even for normal ... A: Where an object (variable) is stored and the life time of the object (variable) is determined my the ...
|
| Linker Error | 10/7/2009 |
Q: Please, tell me what I'm doing wrong with this code... On the Main.cpp file: #include ... A: In the definition of classes Personagem, Jogador1 and Jogador2, you have declared constructors. But ...
|
| hi | 10/3/2009 |
Q: For %d minutes: your bill is $%.2f ",hours,minutes,bill);? #include <iostream> #include <cctype> ... A: > where would i put printf You do not need printf at all as you are using the C++ stream library ...
|
| result in decimal order | 9/30/2009 |
Q: i want answer in desimal digits. for example. i product two large numbers like (22222 * 33333 = )it ... A: You can easily format your output so that fields align correctly, floating point numbers have the ...
|
| constructors | 9/24/2009 |
Q: i have a questions about 'constructors',i actually don't know when should i use them,for example in ... A: I would prefer one of: a. Get 'gradesArray' by using cin. And then send it to constructor. b. ...
|
| Object Oriented Methodology | 9/23/2009 |
Q: Difference Between Following Two Statements: String Name = "Radhika"; String Name("Radhika"); A: Assuming that 'String' is a class which has a (non-explicit) constructor which can be invoked using ...
|
| Padding | 9/23/2009 |
Q: struct X { char ch; int i; char a ; char b; long l; }; First the compiler allots a 4-byte location ... A: C++03 provides no standard keyword or function for querying the alignment requirements of types. ...
|
| Padding | 9/22/2009 |
Q: struct X { char ch; int i; char a ; char b; long l; }; First the compiler allots a 4-byte location ... A: The C/C++ Standards define alignment as a "requirement that objects of a particular type be located ...
|
| c++ | 9/22/2009 |
Q: when i m running this code it is reversing bits properly for 5 or less than 5 number of bits. it is ... A: Probably because the maximum value of an int in the C++ implementation that you are using is limited ...
|
| Constructors | 9/21/2009 |
Q: i want to inherit the base class constructors in to my derive class but its failing. struct B1 { ... A: As per the current International Standard for C++, base class constructors can not be inherited ...
|
| SSE-accelerated MD5 | 9/20/2009 |
Q: A four-fold improvement? Yes, I would be very happy with that :) A four-fold improvement over the ... A: The program computes the MD5 for 64 million bytes of message data for both the non-sse scalar ...
|
| SSE-accelerated MD5 | 9/20/2009 |
Q: A four-fold improvement? Yes, I would be very happy with that :) A four-fold improvement over the ... A: > What were the benchmarks on your machine? So could you send me some benchmarks? I had given the ...
|
| OS | 9/20/2009 |
Q: can a computer work without an Operating System? if yes, how? A: An operating system provides an interface between the hardware and user. It provides management and ...
|
| SSE-accelerated MD5 | 9/19/2009 |
Q: A four-fold improvement? Yes, I would be very happy with that :) A four-fold improvement over the ... A: Let me clarify. MD4 and its successors have been designed with 32bit efficiency in mind. The MD5 ...
|
| SSE2-accelerated MD4 | 8/29/2009 |
Q: I need help implementing an SSE2-accelerated MD4 implementation. I found one that I think may work ... A: > Code is a little convoluted Yes. And I got differences in the MD5 hash (from the results from the ...
|
| heap | 8/27/2009 |
Q: what is the "concept of heap in c++"?? A: In computer science, a heap is a specialized tree-based data structure that satisfies the heap ...
|
| sequential file | 8/26/2009 |
Q: now i working on searching in sequential file with the key 'ID'.i've used binary_search function. ... A: The problem is because after the input of records, std::cin is in an end-of-file state. Any attempt ...
|
| sequential file | 8/26/2009 |
Q: now i working on searching in sequential file with the key 'ID'.i've used binary_search function. ... A: There are several issues with this code. 1. The file is first opened for output in append mode ...
|
| some question about c++ | 8/26/2009 |
Q: what is the difference between turboc++ & borlandc++ ? A: These are the main differences: Turbo C++ Exlorer 2006 (called Turbo hereafter) comes with the ...
|
| Pointers | 8/25/2009 |
Q: How are you.I have some doubts in useing pointers. 1.For every pointer i have to deallocate the ... A: 1.For every pointer i have to deallocate the memory or is it for only the pointers who are created ...
|
| sequential file | 8/24/2009 |
Q: I've written a sequential file that can create a file and adding data to it,i'm trying to write a ... A: > what exactly does the 'path' argument do? 'path' is the pathname of the file eg. ...
|
| some problems about the friend function in the templated class | 8/24/2009 |
Q: I have designed a templated class about a binary tree which includes a friend functions.But it calls ... A: when the compiler sees the friend declaration in class definition friend void ...
|
| sequential file | 8/23/2009 |
Q: I've written a sequential file that can create a file and adding data to it,i'm trying to write a ... A: > i think the solution is to put all the records to an array from the file that i have created > ...
|
| c++ | 8/23/2009 |
Q: on my syllabus it says"to excute c++ programming assignments some assignments will require use of ... A: If your course has specified some prior knowledge as a prerequisite, that is what you should know ...
|
| c++ | 8/23/2009 |
Q: on my syllabus it says"to excute c++ programming assignments some assignments will require use of ... A: To program in portable C++, you do not need unix - any conforming C++ compiler would do. If the ...
|
| URL check | 8/23/2009 |
Q: How are you? I'm trying to write a program that, among other things, needs to validate a website. ... A: The standard C++ library does not provide any facility to do this. You have to use a third-party ...
|
| c++ | 8/23/2009 |
Q: could u pls help mi,i realli need your help.i dun knw which part of the code is wrong.when I input ... A: There are several logical errors in your program - they would have generated compiler diagnostics, ...
|
| 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. First define a structure to hold the student information, like this: #include <string> struct ...
|
| SSE2-accelerated MD4 | 8/20/2009 |
Q: I need help implementing an SSE2-accelerated MD4 implementation. I found one that I think may work ... A: The link that you posted gives a 404 NOT FOUND Here are two C++ crypto libraries that I've used. ...
|
| Static Function... | 8/19/2009 |
Q: Vijayan, Have small query about static function and constructor. Basically, static function can ... A: A static member function is not an operation on an object instance, it can be called without an ...
|
| strings | 8/12/2009 |
Q: please tell me if i want to use modulas and division operation on strings ten how can i do it. when ... A: If the C style string contains only numeric digits, here is one way (error checking has been elided) ...
|
| strings | 8/12/2009 |
Q: please tell me if i want to use modulas and division operation on strings ten how can i do it. when ... A: c-style strings are just arrays of characters, terminated by a null character. Among the built in ...
|
| function arguments | 8/12/2009 |
Q: i have designed two functions like void verify(Hvrbuffer *message)--> this will be work when ... A: In either case, memory for an object of type is not allocated Hvrbuffer is not allocated or ...
|
| logical problem in c++ | 8/11/2009 |
Q: when i am running this code it is not taking input of year.why is this happening and how can i solve ... A: > #include<iostream.h> There is no such header in standard C++. use #include <iostream> using ...
|
| c++ | 8/9/2009 |
Q: please give me more information about switch case.is it possible to call a function with object in ... A: switch(ch) { case 1:rd.getdata_st(); break; case 2:rd.getdata_t(); ...
|
| why is this wrong? | 8/8/2009 |
Q: below i have a working code (version A). if i only change a certain part of the code (version B), i ... A: > pls, where is that to b included in my programme bcuz i dont know where to affix those. Just ...
|
| why is this wrong? | 8/8/2009 |
Q: below i have a working code (version A). if i only change a certain part of the code (version B), i ... A: #include <string.h> There is no such header in ISO C++. Use #include <cstring> instead. The ...
|
| c++ | 8/3/2009 |
Q: could u pls help mi.hw should i truncate a decimal value into a whole number.example:27.56,round off ... A: When a floating point value is converted to an integer type, the conversion truncates - that is, the ...
|
| c++simulator | 8/1/2009 |
Q: could u pls help mi.i realli desperate for your help.could u pls c my code,i'm nt sure whether i am ... A: Here is a snippet which will give you an idea of what you have to do - this deals with just the ...
|
| c++simulator | 8/1/2009 |
Q: could u pls help mi.i realli desperate for your help.could u pls c my code,i'm nt sure whether i am ... A: the running of a discrete-event simulation program is represented as a chronological sequence of ...
|
| more on allocation | 7/31/2009 |
Q: You say that this code below works in C and C++ alike. But it will only work with int or float, not ... A: It will compile in C++ with any pointer. In both C and C++, it is semantically incorrect. Correct ...
|
| dynamic allocation | 7/31/2009 |
Q: How are you? I know how to declare dynamically an array of objects of class MyClass: MyClass ... A: In standard C and C++, the number of elements in an array has to be a constant known at compile ...
|
| dynamic allocation | 7/31/2009 |
Q: How are you? I know how to declare dynamically an array of objects of class MyClass: MyClass ... A: > I know how to declare dynamically an array of objects of class MyClass: > MyClass **array=new ...
|
| Class design | 7/30/2009 |
Q: class X1 { .... }; class X2 { ... }; class X3 { public : X1 *x1; X2 x2; void test (X2 ... A: > In this method void test (X2 *x2, X1 &x1); for X2 i can allocate the memory dynamically , but ...
|
| Class design | 7/29/2009 |
Q: class X1 { .... }; class X2 { ... }; class X3 { public : X1 *x1; X2 x2; void test (X2 ... A: The member X3::x1 is a pointer. This pointer points to an object of type X1 (which is outside the X3 ...
|
| C++ Memory management | 7/28/2009 |
Q: Can you plz tell me how the memory management will happen in C++ ?. we have stack,heap , code ... A: Functions (code) is stored in a part of memory which is separate from that of variables (also called ...
|
| doubt in function argument passing | 7/28/2009 |
Q: 1."Pass by value , Pass by reference ,Pass by address in these 3 types of parameter passing, which ... A: Only pass by value creates a new object of that type. Pass by address passes a copy of the address, ...
|
| when to use pointers & Referencs | 7/27/2009 |
Q: I have some basic questions. I have worked in java for 1 year.Now i moved to C++, Here i am getting ... A: When i have to create pointer object and normal object? Use a normal (named) object in all ...
|
| fibonacci | 7/23/2009 |
Q: i've written a nonrecursive fibonacci function and my purpose is to finding the largest fibonacci ... A: When there is an integer overflow, the bits overflow into the sign bit of the integer and it becomes ...
|
| 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: Any parameters after a parameter having a default argument value must have default argument values. ...
|
| allocation | 7/17/2009 |
Q: I have this loop in my program where I repetedly create an array of pointer to class MyTree ... A: You do not have to, and you can not, do anything to release the memory occupied by the array - it ...
|
| Data Types | 7/16/2009 |
Q: I'm having some trouble understanding some data types and operators in C++, can u help answer these ... A: why j + 100 is discarded when 999 + j is remained, The language specification states "expressions ...
|
| Data Types | 7/16/2009 |
Q: I'm having some trouble understanding some data types and operators in C++, can u help answer these ... A: 1) What is the advantage of enumeration? Why using it when I can just use integer to replace it? An ...
|
| still on the struct and class problems | 7/9/2009 |
Q: ok, i will try to write the functions and let u see them, now i get to understand something totally ... A: There is no difference at all except for the default access specifier. Members of a struct are ...
|
| definition of a Class | 7/9/2009 |
Q: coould you help me out with this problem by partially giving functions to be included in the class ... A: You can have constructors as well as access specifiers (you can have anything that you could have in ...
|
| definition of a Class | 7/8/2009 |
Q: coould you help me out with this problem by partially giving functions to be included in the class ... A: A struct and class are synonyms in C++, they differ only in the default access specifier. from the ...
|
| definition of a Class | 7/8/2009 |
Q: coould you help me out with this problem by partially giving functions to be included in the class ... A: something like this, perhaps. struct entry { entry( const char* wd, const char* expl ) ; // ...
|
| hash tables, fast hash lookup | 6/15/2009 |
Q: In follow up to the question I asked you earlier ("fast vector lookup"): Yes, I was able to get ... A: You need to use the struct sixteen_byte_hash for *both* insert and lookup. To make your task easier, ...
|
| enumuration values | 6/12/2009 |
Q: could you plz tell me that are enumuration values coerced to integer?or are any other types coerced ... A: An enumerated type is used to express the idea that a variable will be used for a specific purpose ...
|
| hash tables, fast hash lookup | 6/5/2009 |
Q: In follow up to the question I asked you earlier ("fast vector lookup"): Yes, I was able to get ... A: First, use a structure to hold your 16 byte (128 bit) digests. enum { NBYTES = 16, NWORDS = NBYTES ...
|
| fast vector search | 6/4/2009 |
Q: This is a follow up to a question I asked you earlier about reading wordlists into memory. Yes, I ... A: > dense_hash is just a super-fast vector. No, dense_hash is a super-fast hash table implementation. ...
|
| data structures | 6/3/2009 |
Q: How are you? Thank you very much for taking questions. I am experimenting with linked lists and ... A: You could use a linked list instead of an array (as in your earlier code). If the only issue is ...
|
| variables definition | 6/2/2009 |
Q: could you please tell me about the difference between data member and class variable and also ... A: #include <iostream> struct account { double balance_amount ; // instance data member variable ...
|
| c++ | 5/31/2009 |
Q: my problem is the makeHeap function,i gt many errors,which i do nt understand.could you pls help ... A: To be const-correct, void printList(sales *arr, int num) ; should be void printList( const sales* ...
|
| c++ | 5/31/2009 |
Q: my problem is the makeHeap function,i gt many errors,which i do nt understand.could you pls help ... A: you have a struct, which, IIRC, is this: struct sales { char id[10]; float sales; }; I think ...
|
| c++heapsort | 5/29/2009 |
Q: Write a main program that reads in the data, populating an array and sorts the array (in descending ... A: It is much easier to write the function recursively. struct sales { char id[10]; float sales; ...
|
| data structures | 5/28/2009 |
Q: How are you? Thank you very much for taking questions. I am experimenting with linked lists and ... A: The problem is in your set_left() and set_right. These need to modify the variable of the caller. ...
|
| Computer Studies pseudocode algorithm | 5/27/2009 |
Q: i recently just wrote a computer studies exam where i was asked to write a simple algorithm in ... A: You require only one loop. init: sw_flights <- 0 kn_flights <- 0 fa_flights <- 0 loop: ...
|
| data structures | 5/27/2009 |
Q: How are you? Thank you very much for taking questions. I am experimenting with linked lists and ... A: if we need a variable number of objects that can only be determined during run-time, we have to ...
|
| f.obj : error LNK2019 | 5/26/2009 |
Q: Vijayan, I'm working on a project for a C++ class and it will compile, but I'm getting linking ... A: A linker error LNK2019 means that there is at least one unresolved external symbol; you have ...
|
| fast vector search | 5/26/2009 |
Q: This is a follow up to a question I asked you earlier about reading wordlists into memory. Yes, I ... A: Preliminary investigations suggest that a google dense_hash_set is a good choice as a hash table ...
|
| fast vector search | 5/25/2009 |
Q: This is a follow up to a question I asked you earlier about reading wordlists into memory. Yes, I ... A: Ignore any earlier reply you might have got - I think I hit the wrong key by mistake. "the goal of ...
|
| c++linked list | 5/23/2009 |
Q: my problem is still the insetStudent function,still many errors.and there is also an error in the ... A: #include<iostream> #include<fstream> // ************** modified ******************** // removed // ...
|
| c++linked list | 5/23/2009 |
Q: my problem is still the insetStudent function,still many errors.and there is also an error in the ... A: I repeat: Modify the first declaration of insertStudent() from void insertStudent( studentNode*& ...
|
| c++linked list | 5/23/2009 |
Q: my problem is still the insetStudent function,still many errors.and there is also an error in the ... A: -In constructors 'studentNode::studentNode char*,int,int,int,studentNode*) -18:error:anachronistic ...
|
| c++linklist | 5/23/2009 |
Q: my problem is the insertStudent.hw do i change it,for the studentid it has to be char *no instead of ... A: > i hv nv learn tis code (explicit) at all.is there another way of writing the code without the ...
|
| c++linklist | 5/22/2009 |
Q: my problem is the insertStudent.hw do i change it,for the studentid it has to be char *no instead of ... A: The function printStudentList() is easy - just iterate through every studentNode in the list, ...
|
| c++linklist | 5/22/2009 |
Q: my problem is the insertStudent.hw do i change it,for the studentid it has to be char *no instead of ... A: Use a std::string to store the student id. see http://www.cprogramming.com/tutorial/string.html ...
|
| c++linkedlist | 5/20/2009 |
Q: Write a C++ program to read in a set of data from a text file which contains the student number, ... A: Make the student number an int, not a char. Write a constructor for studentNode. Write a convenience ...
|
| Header file | 5/18/2009 |
Q: I have a question about the below,can you tell me whats the problem with it that every time i ... A: The error is self-explanatory - the preprocessor can not find the file "GradeBook.h" Generally, it ...
|
| display number structure?? | 5/16/2009 |
Q: In my array arr={10,20,30,40} i want to display output like 10 20 30 40 10+20 10+30 10+40 20+30 ... A: The simplest way is to write a recursive function. for example: #include <iostream> #include ...
|
| display number structure?? | 5/16/2009 |
Q: In my array arr={10,20,30,40} i want to display output like 10 20 30 40 10+20 10+30 10+40 20+30 ... A: In a C++ program, prefer using C++ functions for io. Avoid <conio.h>, it has never been a standard C ...
|
| getline() | 5/15/2009 |
Q: my question is about the code below.when i run the programme after that i enter nameofcourse why it ... A: std::istream& std::getline( std::istream& stm, std::string& str, char delimiter = '\n' ) ; reads a ...
|
| std | 5/14/2009 |
Q: i have a question about using std in c++ programming,for instance using 'std::cout' , 'std::cin' or ... A: If the only programs that were ever written were only by one person, things like namespaces probably ...
|
| writing at specific locations in a .txt file using c++ | 5/13/2009 |
Q: I have a text file(.txt), it contains 10000 lines (decimal values with + and -) continous of fixed ... A: The simplest way to do this is: a. read the original file line by line b. write out each line read ...
|
| FILE | 5/2/2009 |
Q: i have written the code below,it works correctly,but my question is that why when i delete the line ... A: fopen("c:\\text.txt","r+"); opens the file for reading and writing. The stream is positioned at ...
|
| reading wordlist words into memory | 4/30/2009 |
Q: I am writing a program which will access a wordlist file and check every word in that file to see if ... A: > Am I correct in understanding that the entire wordlist has been loaded into memory? Yes. > The ...
|
| reading wordlist words into memory | 4/26/2009 |
Q: I am writing a program which will access a wordlist file and check every word in that file to see if ... A: > The wordlist file has millions of words, and I cannot be sure > of the length of them (thus char ...
|
| c++ | 4/23/2009 |
Q: could you pls help mi!!!i do nt knw which part of my code went wrong.wen i run the program,it onli ... A: > i want the text file to be able to read a blank space. You can leave a blank space space in ...
|
| c++ | 4/23/2009 |
Q: could you pls help mi!!!i do nt knw which part of my code went wrong.wen i run the program,it onli ... A: In you data file, ACCADDEBBABAADCCAEAA Jack ACBADDE BACBADCBAEBA Angie CCBAEEA BBACDDEDEBCC ...
|
| Do While Loop Problem | 4/23/2009 |
Q: To start off, i'm very new so this could be an easy fix. I use dev C++. let me just put the code. ... A: change do { // ..... } while( answer != "Raleigh" || answer != "raleigh" ) ; to ...
|
| horner's method | 4/21/2009 |
Q: i have a project in c++,it is about horner's method,and the program should run it. but i don't know ... A: Horner's method is a technique for evaluating polynomials. It uses nested multiplication instead of ...
|
| loop | 4/20/2009 |
Q: I was the following... Write a program that displays a menu with the following choices to the user. ... A: revision: change to public to find the largest number entered by a user, you do not need to store ...
|
| call by refrence | 4/17/2009 |
Q: i have a question about calling variables in functions could you plz tell me what's the diffrence ... A: > the address of 'a' will be change the address of 'a' will never change. once an object is ...
|
| data structures | 4/15/2009 |
Q: i actually need to make a project in which i have to make a programme in c++ in which i have to ... A: A good place to learn about a simple way of doing this is to read the section on implementing ...
|
| i need help in my assignment | 4/11/2009 |
Q: my assignment talking about string manipulation and he needs a menu of 11 : 1. Inputting new string ... A: 1. Inputting new string assuming that 'Inputting new string' means read a line of text, use ...
|
| file in c | 4/9/2009 |
Q: i want to learn about file code,i wrote the fallowing code it doesn't have error but doesn't work ... A: > it doesn't have error but doesn't work that it compiles is no guarantee that it will not fail at ...
|
| dev c++ | 4/9/2009 |
Q: i am a student trying to learn dev c++ and i am having trouble making a program. the program ... A: first declare an array that can hold six numbers enum { ARRAYSIZE = 6 } ; int numbers[ARRAYSIZE] ; ...
|
| C SOLUTION | 4/5/2009 |
Q: recently i came across this question in our campus interview. which i dint clear. they dint gave the ... A: "Fancy algorithms are slow when n is small, and n is usually small. Fancy algorithms have big ...
|
| question | 4/2/2009 |
Q: write a program that reads in a sentence of up to 100 characters and outputs the sentence with ... A: to read in a sentence, read character by character till a period is encountered. std::string ...
|
| a question | 4/1/2009 |
Q: i want to write a programme that shows all combination of 'n' variable,for instance for two variable ... A: > for instance for two variable 'a' and 'b',it prints:"aa","ab","ba","bb" "ab" is a different ...
|
| C++ | 3/18/2009 |
Q: I need to find all the numbers that are perfect square between 1000 and 9999 and the first 2 digits ... A: to find all numbers between 1000 and 9999 which are perfect squares, a. determine the integer a ...
|
| floating point value | 3/18/2009 |
Q: I want to know how can we print only the magnitude of any floating point value that is assigned to a ... A: this is easy, isn't it? one way is to print -a if a is negetive, +a otherwise. another way is to ...
|
| query in c++(about random() function) | 3/12/2009 |
Q: what output will this code produce? main() { randomize(); char ... A: > what output will this code produce? a cascade of compiler errors. error: ISO C++ forbids ...
|
| C++ While Loop | 3/10/2009 |
Q: I am trying to build a shopping program for my daughter but I'm stuck! Could you help me out? Here's ... A: > What I would like to do is form a loop ... up until a negative price value is entered the simple ...
|
| I/O port programming | 3/7/2009 |
Q: How are you? I would like to start learning I/O port programming. I'd like to write software that ... A: there is a fair amount of literature available. these are some books that have been well spoken of: ...
|
| hello | 3/5/2009 |
Q: 1-I want to know why we put constant in this line(char* dest,const char*src) although if we dont put ... A: > why we put constant in this line strcpy( char* dest, const char* src ) because the source of the ...
|
| c++ not working | 3/5/2009 |
Q: actually this question not regarding code. i copied a c++ software from my friend a few days ago. ... A: > can you tell me how to fix the problem? i might be able to tell you that if i know a. what the ...
|
| Command line | 3/3/2009 |
Q: Could you please critique my code? It keeps getting wrong output, and I don't know why. It is a ... A: one immediate problem i can see in your code is: for (int i=0; i<=n; i++) { if( i%n == 0 ) ...
|
| c++ & c# | 3/3/2009 |
Q: Drawbacks of exception handling in c++ & c#. A: i am not a C# programmer; so the following comments are for C++. in any case, languages like C# and ...
|
| Priority | 3/2/2009 |
Q: By priority of each expression I mean for instance '*' has a higher priority than "-". I appreciate ... A: > The problem is that I don't know how to come up with the code that checks the priority... that is ...
|
| Priority | 3/2/2009 |
Q: By priority of each expression I mean for instance '*' has a higher priority than "-". I appreciate ... A: your comments indicate that you are on the right track; to take care of precedence, you need to ...
|
| Priority | 3/1/2009 |
Q: By priority of each expression I mean for instance '*' has a higher priority than "-". I appreciate ... A: let us say we have a grammar in which integer numbers and the binary operators +, -, * and / are the ...
|
| My new programming language | 2/28/2009 |
Q: Sir, I'm creating a new programming language using C++. The idea is to write a C++ program that can ... A: > When the program is executed for the first time it shows errors for > the correct program & it ...
|
| Counting Inversions | 2/24/2009 |
Q: I am trying to find the number of inversions using merge sort, but I am having trouble counting up ... A: well, the function MergeSort does seem to return the number of inversions. i haven't gone through ...
|
| C++ classes | 2/22/2009 |
Q: I am trying to do a C++ program with 2 classes Employee and Company. Employee has a member function ... A: the array employee_collection contains *pointers* Employee objects, not the objects themselves. so ...
|
| C++ classes | 2/21/2009 |
Q: I am trying to do a C++ program with 2 classes Employee and Company. Employee has a member function ... A: > Employee has a member function called getempID ... > char* Employee::getempID() > { > return ...
|
| C++ | 2/16/2009 |
Q: I have tried to develop a C++ program that read information of employees using project, I only ... A: a. have an array of 100 employees and a variable to hold the number of employees. enum ...
|
| c++text file | 2/13/2009 |
Q: the program prompt user to enter the filename of a text file and number of columns(width).It will ... A: > All lines will terminate with a Carriage Return(CR) and Line Feed(LF) this is incorrect (at the ...
|
| Stack question | 2/13/2009 |
Q: I asked you a Java Q before and you got me started pretty well. I've already asked the Java people ... A: right from jdk 1.0, java has has a built-in stack class java.util.Stack ...
|
| C++ converting roman to decimal | 2/13/2009 |
Q: In Programming Exercise 1 in Chapter 11 (D.S. Malik, 4th edition), we defined a class romanType to ... A: Rules regarding Roman numerals sometimes state that a symbol representing 10^n may not precede any ...
|
| extract characters after a space in a string | 2/7/2009 |
Q: How do I extract a word after a space in a string? A: the simplest way is to use a stringstream. for example, #include<string> #include<iostream> ...
|
| doubt in c++ | 2/7/2009 |
Q: How to extract contents of a file in c++ using linux compiler? A: firstly, C++ conforms to an International Standard and io can be performed in a platform independant ...
|
| Divisors program confused? | 2/6/2009 |
Q: I want to write a program that finds how many divisors a number has, and displays what those numbers ... A: to break up the problem into two smaller subproblems: problem a. check if a number is the divisor ...
|
| problem in c++ | 2/6/2009 |
Q: what to do if an error "unable to open file iostream .h" is displaying and how to change or correct ... A: <iostream.h> is not (and never has been) a standard C++ header. many compilers still support it ...
|
| Beginning a Programming language | 2/6/2009 |
Q: I am still in High School and would like to learn a programming language. I feel it would help me ... A: I would recommend lisp. You are still in high school, you would get an opportunity to learn ...
|
| set method | 2/5/2009 |
Q: This would be my last question I promise :) Again having in mind the following are my data members: ... A: you need to adjust the size to reflect the new element which has been added. public void ...
|
| TrimToSize() method | 2/5/2009 |
Q: You helped me earlier with my Java code a little. I have asked the java quys but they haven't got ... A: trimming the array should a. create a new array of *size* (not objects.length-size) elements b. copy ...
|
| Tree Templates | 2/4/2009 |
Q: we are working on Multi Target Tracking Project, for that we need to create some tree templates ... A: well, what kind of a tree do you want? here is an AVL-Tree implementation: ...
|
| compiler of C++ | 2/3/2009 |
Q: what is the compiler of C++ language? does C++ uses any interpreter also? is the compiler and ... A: Turbo C++ is a C++ compiler and integrated development environment (IDE) from Borland. its compiler ...
|
| compiler of C++ | 2/2/2009 |
Q: what is the compiler of C++ language? does C++ uses any interpreter also? is the compiler and ... A: > what is the compiler of C++ language? see: http://en.wikipedia.org/wiki/Compiler C++ is a ...
|
| file | 2/2/2009 |
Q: i have writen a class and then i have writen another class using an object of the first class! now i ... A: use a std::ofstream to write to a file and a std::ifstream to read from a file. see: ...
|
| request | 2/2/2009 |
Q: sir, i m researh scholar pursuing phd. i m working on object-oriented software development. i m ... A: you could freely pick up this information for any open source project. i presume that to really ...
|
| Array of Objects | 2/2/2009 |
Q: From your profile I kind of guessed that you may probably know Java as well! so I have a Java ... A: > I kind of guessed that you may probably know Java as well! i am not a java programmer; i do not ...
|
| lottery numbers | 1/31/2009 |
Q: It has been a while since i have done any work with c++ and i was wondering if you could help me out ... A: represent each ticket as an array of 6 numbers. and since we have 150 tickets, have an array ...
|
| problem in reading from a file | 1/29/2009 |
Q: I am making a project for my practicals which is a game in which the admin can enter questions and ... A: #include<fstream.h> #include<conio.h> #include<stdlib.h> #include<stdio.h> #include<string.h> none ...
|
| Algorithm | 1/26/2009 |
Q: If a problem belongs to P class then can it belong to NP class? Answer according to current research ... A: The typical question in in computational complexity theory is, "As the size of the input to an ...
|
| Unix like programming help needed | 1/21/2009 |
Q: I need help in the following please: I know that in unix like systems there is only one ALARM ... A: Signals are notifications sent to a process in order to notify it of various events. they interrupt ...
|
| about writing and reading to disk | 1/21/2009 |
Q: suppose i have a class Person. that prints a person's name and the number of brothers that person ... A: instead of using std::cin for reading and std::cout for writing formatted output, use a ...
|
| divide and Conquer Algorithm | 1/21/2009 |
Q: I have created a Recursive and NonRecursive algorithm for calculating the sum of integers. I've ... A: The basic idea behind a recursive function is that you can solve a problem by breaking it into ...
|
| more efficient? | 1/20/2009 |
Q: could you tell me which one is more efficient and why please? if (a && b) f1(); else f2(); or if ... A: the two forms are not equivalent. form one is: a b result -- -- ------ T T ...
|
| better code? | 1/20/2009 |
Q: I'm new at programming but my teachers say that we need to practice to write better codes. How could ... A: loop unrolling (as in the example above), is a technique that attempts optimize a program's ...
|
| C++ | 1/19/2009 |
Q: Write is copy constructor?write its types?Also explain it with the help of example? A: this is already answered at many places. for example, see: ...
|
| help me plz | 1/2/2009 |
Q: can you please help me with this code below,i want this to put the returning value of the token ... A: main *must* return an int. the int returned by main() is a way for a program to return a value to ...
|
| Entity / relationship Diagram | 1/1/2009 |
Q: Entity / relationship Diagram I know this is totally off the topic but was just wondering if you ... A: this is the mit opencourseware page: http://mit.nelc.edu.eg/OcwWeb/index.htm ...
|
| Entity / relationship Diagram | 1/1/2009 |
Q: Entity / relationship Diagram I know this is totally off the topic but was just wondering if you ... A: relationships between entities which fall into three types: one to one: example => diploma - ...
|
| Thread mutex question | 1/1/2009 |
Q: I know this question is not related to your field but I figured you may be able to help me on this ... A: glad you could solve this yourself by realizing that you need to link with libpthread. ideally, you ...
|
| Thread mutex question | 12/30/2008 |
Q: I know this question is not related to your field but I figured you may be able to help me on this ... A: ok. read these pthread tutorials first. https://computing.llnl.gov/tutorials/pthreads/ ...
|
| Thread mutex question | 12/29/2008 |
Q: I know this question is not related to your field but I figured you may be able to help me on this ... A: the current c++ standard (c++98) has no library support for threads; you have to rely on threading ...
|
| problem with linklist | 12/25/2008 |
Q: i have a problem in this code below.i want to write a linkedlist that "head" always points to the ... A: a[i]=b[j] ; copies the char at position j in string b to the char at position i in string a. ...
|
| problem with linklist | 12/25/2008 |
Q: i have a problem in this code below.i want to write a linkedlist that "head" always points to the ... A: in C, a string is an array of characters (memory containing a sequence of characters) ending in a ...
|
| shared constant base class/derived class dilemma | 12/23/2008 |
Q: My question is about how to do something that should be simple, but classes/inheritance doesn't seem ... A: > initializing the constant string in a method wouldn't work from the constructor or Initialize() ...
|
| shared constant base class/derived class dilemma | 12/22/2008 |
Q: My question is about how to do something that should be simple, but classes/inheritance doesn't seem ... A: have a virtual function virtual const char* filetype_string() const = 0 ; in the base class. ...
|
| problem with linklist | 12/22/2008 |
Q: i have a problem in this code below.i want to write a linkedlist that "head" always points to the ... A: you need to allocate a separate node for each element in the linked list. the link for every node ...
|
| c++ | 12/15/2008 |
Q: What is core language and why is c++ called a core language? A: in computer programming, the 'core language' is the definition of a programming language (sometimes, ...
|
| still on my increment operator | 12/12/2008 |
Q: I have the code this way but when i compile and run the programme, it's doing nothing. supoose i ... A: > when i enter a time say : 12:05 it's giving me zeroes the code as it is will work as expected if ...
|
| Static Function | 12/11/2008 |
Q: I need some clarification about static functions. I have basic idea about static function but my ... A: no, IS 12.8/15 allows this kind of optimization at any place where it recognizes that the following ...
|
| still on my increment operator | 12/11/2008 |
Q: I have the code this way but when i compile and run the programme, it's doing nothing. supoose i ... A: there is an error in the overloaded prefix increment operator: the time is incremented twice. Time ...
|
| Static Function | 12/10/2008 |
Q: I need some clarification about static functions. I have basic idea about static function but my ... A: Temp Temp::make() { return Temp(); //While retuns copy constructor been involved or not } ...
|
| Even when I include cstdlib. | 12/9/2008 |
Q: Okay I did have include <cstdlib> and it still won't run and gives the "expected constructor ... A: > Here's your way: #include <ctype.h> // ... int main() { // ... } ...
|
| compilation error | 12/8/2008 |
Q: There is an error when compiling: I've run the program and it points to system("pause"); and the ... A: the system() function is declared in <cstdlib> or <stdlib.h> in C. you need to #include the header. ...
|
| here's the code | 12/8/2008 |
Q: okay here it is. i just want it to get over with. #include <cstdlib> #include <iostream> #include ... A: ok. here are the errors in the code. 1. the gender string has to be accepted from the user. add ...
|
| same problem again. | 12/7/2008 |
Q: i'm really sorry. But the problem is I want the user to input characters with only m and f as well ... A: modify if( ( gender != "male" ) && ( gender != "female" ) ) { std::cout << "gender is ...
|
| Still a problem. | 12/7/2008 |
Q: Hey. I've attempted your code. But there's still an error. I want to try all the possibilites like ... A: ok. since you want to accept complete strings (and not just a single character), modify your loop to ...
|
| any idea pls | 12/7/2008 |
Q: i was studying the post increment and preincrement operator overloading in the c++ language. I ... A: > so that if i enter 10:00 as time, and i want it to print time++(post incremnt), that gives 10 ...
|
| Hey again. | 12/7/2008 |
Q: I understand c++ upto using strings and functions. What about like asking the user to output male or ... A: > Isn't there a way to find out without using algorithms but just using if, while or do loops and ...
|
| any idea pls | 12/7/2008 |
Q: i was studying the post increment and preincrement operator overloading in the c++ language. I ... A: before we come to the prefix and postfix increment operators, a few issues first: a constructor ...
|
| Hello PLEASE HELP. | 12/6/2008 |
Q: I wanted to know if you could give me the code using strings for a name. What I mean is for example: ... A: the standard C library function isdigit(int) in the header <ctype.h> returns non-zero (true) if its ...
|
| Bank Account program in C | 12/5/2008 |
Q: Apologies for not being clear in my previous e-mail. Below is an answer to a question you sent on ... A: ok. here is my way of writing this program. (there are several other ways to do it). *** warning: ...
|
| plz help | 12/4/2008 |
Q: in this code below in the line that i have signed i don't know why it just print the value x=1 and ... A: void BUG( int x, int y ) ; function BUG takes the parameters by value. what bug gets are copies ...
|
| constructors | 12/3/2008 |
Q: For the following prog u get the output as: 00000 01010 I don't understand why.. Just explain me ... A: this is a serious technical blunder. class Base { // ... }; class ...
|
| help me plz | 11/30/2008 |
Q: i have a problem whit the code below,in the rows that i have signed the code i want the program to ... A: you are causing a buffer overflow for the array mark int mark[10][10],m,n; void main() { int ...
|
| plz help | 11/29/2008 |
Q: can you give me a code wrote with rnd function for choosing a number between 1-10? i really get ... A: rand() returns an integer between 0 and RAND_MAX (inclusive). the constant RAND_MAX is ...
|
| plz help | 11/29/2008 |
Q: can you give me a code wrote with rnd function for choosing a number between 1-10? i really get ... A: rand() returns an integer between 0 and RAND_MAX (inclusive). the constant RAND_MAX is ...
|
| Physica | 11/29/2008 |
Q: Sir, Let me know how can I perform PC parallel port interfacing experiments in C++ in windows XP ... A: depends on the functions that you used in the code for windows 98. it may be possible to use the ...
|
| plz help | 11/27/2008 |
Q: i have a problem about the code below it has an errrore for the push function ,it is"error C2601: ... A: a brace is wrongly placed. a closing } in main is missing and push has an extra } void push(struct ...
|
| Heritage Question | 11/26/2008 |
Q: Below is an example I took from a book. Could you confirm that out of those 8 statements below, only ... A: i presume, you intended class Derived : public Base { .... }; and that Base and Derived are ...
|
| changing a for loop to a while loop | 11/25/2008 |
Q: I was told that we should be able to make a while loop from a for loop, is that true? I have tried ... A: the for statement provides a compact way to iterate over a range of values. programmers often refer ...
|
| Complexity of Algorithms | 11/25/2008 |
Q: Could you tell me how to find Complexity of Algorithms of the functions add and extract? also if you ... A: if you mean, a function that sorts an array using FilePrio: if the number of elements in the array ...
|
| Complexity of Algorithms | 11/25/2008 |
Q: Could you tell me how to find Complexity of Algorithms of the functions add and extract? also if you ... A: function add has to execute a loop (the while loop for determining the position of the item in the ...
|
| copy constructor and assignment operator | 11/24/2008 |
Q: could you tell me the difference between copy constructor and the assignment operator? I guess the ... A: > could you tell me the difference between copy constructor and the assignment operator? a copy ...
|
| copy constructor and assignment operator | 11/24/2008 |
Q: ) I still have some more questions there which I commented on the code. Also if we were to write a ... A: // let's say we have 5, 10, 11, 12 and our t is 7 template <typename T> void FilePrio::add( const ...
|
| add/delete an element | 11/24/2008 |
Q: You're my favorite expert on this site, I'm glad you're back from vacation :) I am trying to do ... A: emplate <typename T> void FilePrio::add( const T& t ) { // don't we need to add someting like if ...
|
| add/delete an element | 11/24/2008 |
Q: You're my favorite expert on this site, I'm glad you're back from vacation :) I am trying to do ... A: i am guessing, the intent seems to be: template <typename T> class FilePrio is a singly linked list ...
|
| C++ Programming | 11/24/2008 |
Q: two one-dimensional arrays A and B which are stored in assending order.to merge them into a single ... A: here is a simple non-recursive pseudocode implementation to merge two arrays a, b into array result: ...
|
| prime numbers | 11/21/2008 |
Q: im given an assignment in which the user is to enter the number of prime numbers to be displayed and ... A: > i know how to check if a number is prime if you know that, the rest is trivial. a. you would be ...
|
| plz help | 11/20/2008 |
Q: i want to learn graphic programming in c++ visual studio,can you help me which language i should ... A: the learning curve for graphics programming is fairly steep. you should be prepared to invest time ...
|
| testing all the functions | 11/16/2008 |
Q: you were right, I wasn't compiling the right file! thanks :) Do you believe that my test program ... A: the basic idea of testing is to try and discover errors. in general, you would get the best return ...
|
| test program | 11/16/2008 |
Q: it's me again :) could you also please help me to come up with a test for operator++ and ... A: > are there any side effects of having everything in .h file in my case( list.h) or in general? in ...
|
| test program | 11/16/2008 |
Q: it's me again :) could you also please help me to come up with a test for operator++ and ... A: > is "firstElement = 0 ; " same as "firstElement = NULL ; "? yes, in C++ the definition of NULL is ...
|
| test program | 11/15/2008 |
Q: it's me again :) could you also please help me to come up with a test for operator++ and ... A: > I understand the difference between the prefix and postfix but don't know how to test them! there ...
|
| typename template | 11/15/2008 |
Q: the link you sent me was excellent. thank you so much :) Could you explain the difference between ... A: in template < typename T > void List<T>::Iterator::next() { position = position->next; } the ...
|
| testing the code | 11/15/2008 |
Q: I did as you suggested and it is working now :) could you help me to come up with a test program ... A: a 'container' or to be more precise, a 'sequence container' is a class that holds a. a collection of ...
|
| testing the code | 11/15/2008 |
Q: I did as you suggested and it is working now :) could you help me to come up with a test program ... A: everything in the C++ standard library resides in the namespace std. std::cout, std::string, ...
|
| testing the code | 11/15/2008 |
Q: I did as you suggested and it is working now :) could you help me to come up with a test program ... A: the paste bin seems to be a good idea. the code is much more readable that it would be if you place ...
|
| C++ internal class | 11/14/2008 |
Q: Below I pasted my list.h file for you to see. I am a newbie in C++. My template classes work fine ... A: templates are a pure compile-time mechanism. the compiler needs to see the template code for any ...
|
| plz help | 11/14/2008 |
Q: i wrote the code below but i have a problem with the first function,for example we enter m=1 and ... A: the Ackermann function is a general recursive function. And you can implement it with three ...
|
| C++ internal class | 11/14/2008 |
Q: Below I pasted my list.h file for you to see. I am a newbie in C++. My template classes work fine ... A: since the List<T> and List<T>::Iterator needs to use the name Element<T> and Element<T> needs to ...
|
| plz help | 11/14/2008 |
Q: i wrote the code below but i have a problem with the first function,for example we enter m=1 and ... A: > can you check it out,and tell me if there is another way or easier way for correcting it? it is ...
|
| C++ internal class | 11/14/2008 |
Q: Below I pasted my list.h file for you to see. I am a newbie in C++. My template classes work fine ... A: all you have to do is declare/define the class Iterator within the List<> class. the template ...
|
| plz help | 11/13/2008 |
Q: i wrote the code below but i have a problem with the first function,for example we enter m=1 and ... A: You can treat the arguments of a function as variables, however direct manipulation of these ...
|
| C assending integers alghorithm | 11/13/2008 |
Q: I have a mid-term coming up on C. One of the practice problems was to ask the user for 3 integers ... A: void swap( int* a, int* b ) { int temp = *a ; *a = *b ; *b = temp ; } int main() { ...
|
| C assending integers alghorithm | 11/12/2008 |
Q: I have a mid-term coming up on C. One of the practice problems was to ask the user for 3 integers ... A: from the question, i presume that you have not yet come to arrays or functions. if that is the case, ...
|
| c program help | 11/11/2008 |
Q: Writing a C program (call it RandPass.c) which can generate such passwords from 6 to 12 characters ... A: 1. write a function to generate a random printable character a. generate a random int in ...
|
| text file processing | 11/11/2008 |
Q: Could you please take a look at my code? I cannot figure out why my code is displaying incorrect ... A: > I'm pretty sure the error is in my while loop. yes, your while loop has a subtle error in handling ...
|
| while loop Question ?? | 11/4/2008 |
Q: Write a program that estimates the value of the mathematical constant e by using the formula: e = ... A: indent your code. makes it much easier to read and modify. unless you are using an obsolete ...
|
| c++ | 11/3/2008 |
Q: Plz give me Project proposal for any game. A: if you are in the process of learning programming, the game that you program should a. be easy to ...
|
| overloading << and >> operators | 11/3/2008 |
Q: Vijayan I know that in order to overload the << and >> operators I must do sth like this inside my ... A: the overloaded << operator is used by the compiler this way. note: C++ streams are not copyable; ...
|
| c++timetable | 10/28/2008 |
Q: tis is the code i wrote for constructing the timetable could u pls help mi!!!i do nt knw why my ... A: the approach is right. but the basic problem with your code is: a. the use of uninitialized ...
|
| lexicographical_compare | 9/30/2008 |
Q: I would like to know what is Leaxicographical_compare? I want to implement in linked list for ... A: The name of the lexicographic order stems from the order given to words in a dictionary: a sequence ...
|
| errors | 9/28/2008 |
Q: what is difference between compile time error and run time errors??????????? A: A compile-time error is an error that the compiler gives when compiling your code. For example, the ...
|
| I need help with a C program please. | 9/25/2008 |
Q: I'm a complete newbie to C programming and I need help writing a program. The program should do the ... A: You are almost there. Here is an outline of what you should do: #include <stdio.h> int main(void) ...
|
| how to make a project of library | 9/24/2008 |
Q: sir i want to make a program of library where i want following points to be included: 1.store the ... A: implement the classes: date - keep a calendar date eg. 12 june 2009 title - the book title eg. ...
|
| .dlls in c++ | 9/18/2008 |
Q: what are dll files? are they different in windows and turbo environment? how are they created and ... A: > what are dll files? a library is a collection of subroutines used to develop software. Libraries ...
|
| What is signal? | 9/18/2008 |
Q: Hey thanks for ur reply to my earlier question. there are two functions available ,signal() and ... A: A signal is a limited form of inter-process communication used in Unix, Unix-like, and other ...
|
| STL::iterator | 9/17/2008 |
Q: I have read source as to how to make own iterator for linked list. I have some problem while ... A: the error message is self-explanatory: 'A reference return value must be an lvalue' 0 is a literal ...
|
| file handling | 9/3/2008 |
Q: I want to make a programming for reading existed file then multiplying each data and write each of ... A: the simplest way to do this would be to: a. read one line from the file into a string b. from the ...
|
| file handling | 9/2/2008 |
Q: I want to make a programming for reading existed file then multiplying each data and write each of ... A: that is pretty simple: // open input, output files ifstream fin( in_file ) ; ofstream fout( ...
|
| c++ file handling | 9/1/2008 |
Q: I want to make a programming for reading existed file then multiplying each data and write each of ... A: to set the format to fixed-point and precision to (say) 6 decimal digits after the decimal point: ...
|
| difference of <> and " " | 8/31/2008 |
Q: sir, when im includeing a header file for eg #include<stdio.h> and also as #include"stdio.h" both ... A: for a #include <header_name> new-line searches a sequence of implementation-defined places for a ...
|
| c++ file handling | 8/31/2008 |
Q: I want to make a programming for reading existed file then multiplying each data and write each of ... A: if you are familiar with the STL part of C++, #include <iostream> #include <fstream> #include ...
|
| doubt regaring wParam | 8/28/2008 |
Q: My question iis, is there any specific value for the middle click(that is the scroling button in b/w ... A: if the middle mouse button goes down on the client area of a window, a WM_MBUTTONDOWN message is ...
|
| spech technology in c++ | 8/25/2008 |
Q: sir, i am currently interested in doing a project on speech technology through c++ implementation ... A: what aspect of speech technology are you doing a project on? is it speech recognition, speech ...
|
| Creating class objects by reading text file | 8/22/2008 |
Q: I want to create a class object by reading the text file. For example, if my text file has sentence ... A: > where could call of the void save(..) and base* create_from_stream(..) lie? anywhere, really. if ...
|
| Creating class objects by reading text file | 8/21/2008 |
Q: I want to create a class object by reading the text file. For example, if my text file has sentence ... A: in a simple scenario, you could do something like this: #include <iostream> #include <fstream> ...
|
| different variables stored where | 8/21/2008 |
Q: where are these variables stored in memory and in which part RAM/ROM? 1)static 2)global 3)const ... A: where a variable is stored and the life time of the variable is determined my the storage duration ...
|
| Read file into 2D array | 8/19/2008 |
Q: I do not know what is wrong with the following code. I am trying to read data into a 2D array. The ... A: ok, let's start from the top in your code: > #include <iostream.h> > #include <fstream.h> I suppose ...
|
| macros in c++ | 8/18/2008 |
Q: Vijayan what is the purpose of macros in c++? and how can i use a macro from another file/program? ... A: > what is the purpose of macros in c++? macros are a type-unsafe feature of the C preprocessor and ...
|
| book | 8/18/2008 |
Q: Please tell me the best book for ASP.NET and c#. Thanks, RAVI A: i am not an expert on C# or ASP.NET. i have some familiarity with C# and you might find C# ...
|
| regarding c and c++ standard library | 8/16/2008 |
Q: I am doing my MSc project to find out code complexity for some companies in both C an C++. And also ... A: the gnu compilers and libraries for both C and C++ are perhaps the most widely used by programmers. ...
|
| cstrings and strings in c++ | 8/15/2008 |
Q: Vijayan i want to convert from cstring to strings and vice versa how can i do this? thanks A: c strings are simply arrays of char terminated by a null char. eg. char cstr[] = "hello" ; cstr is ...
|
| Object stream | 8/14/2008 |
Q: . We r implementing one network protcol in c++ , we are using java code as reference.. In java we ... A: to perform network i/o, you could use the socket++ library. it has the same interface as that of the ...
|
| bank account program in C | 8/13/2008 |
Q: Bank Account Problem 1. Create a bank account for a maximum of 10 persons. 2. Each account has ... A: 1. define a struct bank_account to hold the information about an account in one place. 2. create an ...
|