C++/Questions

SubjectDate AskedExpert
using a nested loop in dev c++2/5/2012Tehreem
  Q: Your task is to display on screen the 'N' symbol given two data: the length and the character symbol ...
  A: Sorry i could not respond to you earlier. Here is the code you need: #include<iostream> using ...
problem with strcmp function1/26/2012Zlatko
  Q: I was trying to compare two strings, both char [50] types, using strcmp function. But an error crept ...
  A: There are two issues. In the sendname method, char* Person::sendname() { ptr = clsname; ...
Working with keyboard1/23/2012Ralph McArdell
  Q: I am trying to create a game in which there will be falling items and I have to use the keyboard to ...
  A: As you give no details of what platform, tools, frameworks, etc. you are using nor what the ...
Is heap an implicit data structure to implement priority queue?1/20/2012vijayan
  Q: My question might seem childish but I really don't understand this question as I am just a newbie to ...
  A: I too don't really understand what the term 'an implicit data structure' means. Perhaps, the ...
Is heap an implicit data structure to implement priority queue?1/20/2012Tehreem
  Q: My question might seem childish but I really don't understand this question as I am just a newbie to ...
  A: Heap itself is an implicit data structure. But it is not specialized for priority queue. A priority ...
counting certain characters in a vector1/17/2012Ralph McArdell
  Q: halo mr.mcardell. my question is simple,how do i count certain characters in a vector,for example,if ...
  A: I would like to start by stating the assumptions I have made from your question for the purposes of ...
asdasdasdasd1/10/2012Tehreem
  Q: input:paulo hariramani output:Paulo Hariramani using string manipulation
  A: This is a program to convert lower case to upper case characters. You can apply simple programming ...
writing a struct with bit fields into a file.1/9/2012Zlatko
  Q: halo mr. zlatko. this question is simple but it's part of a much larger project. the issue is ...
  A: When writing to files, the smallest data type which can be use is the byte. You cannot write ...
saving a structure to a file.1/9/2012vijayan
  Q: halo mr. vijayan. my question is relatively simple (i am new to programming). how do you write a ...
  A: Input-output of a bit field directly is not a good idea; there are implementation-dependencies ...
Error in program1/3/2012vijayan
  Q: I use Turbo C++ v4.5 on Windows Vista. The below-mentioned program always gives an error "Error ...
  A: 1. Switch to a more current compiler suite and IDE - for example, CodeBlocks+MinGw ...
SilverLight for Windows Phone , String to integer12/30/2011Zlatko
  Q: I am currently working on a project to create a windows phone application on Visual Studio using C++ ...
  A: You could do this with stringstream if your string has many things and you wish to pick them off ...
64-bit12/29/2011vijayan
  Q: How are you? I have written a script for a 32-bit machine (Ubuntu). I'm now compiling it for a ...
  A: > What is the right way to do it so that it would work on both 32 and 64-bit? When printing out a ...
Help me to fix the bug in my c++ code12/25/2011vijayan
  Q: The following function in Turbo C++ (Win XP environment) has been written to return the maximum of ...
  A: Without seeing the whole program, I don't know why you get an error after adding precisely 13 ...
dynamic bit-fields12/16/2011Zlatko
  Q: I was wondering if there is such thing as a dynamic bit-field or any other way to implement it? To ...
  A: Well thanks for being patient, I have had a busy week. To answer your question, you would need ...
Programming Language Source Files Business Rules.12/15/2011Zlatko
  Q: http://en.wikipedia.org/wiki/Source_code There are some queries from my side regarding Programming ...
  A: In Windows, filenames are not case sensitive, so the C# would compile a .CS file. In fact, the two ...
Programming Language Source Files Business Rules.12/15/2011Zlatko
  Q: http://en.wikipedia.org/wiki/Source_code There are some queries from my side regarding Programming ...
  A: You could use any extension you like for your new language, but if you use a popular extension, you ...
Programming Language Source Files Business Rules.12/15/2011vijayan
  Q: http://en.wikipedia.org/wiki/Source_code There are some queries from my side regarding Programming ...
  A: > Can Programming Language Source code file naming extensions be duplicated ? > Does it become ...
dynamic bit-fields12/12/2011Zlatko
  Q: I was wondering if there is such thing as a dynamic bit-field or any other way to implement it? To ...
  A: Yes of course it is possible to implement it. It would be built upon the tools I described in this ...
dynamic bit-fields12/12/2011Ralph McArdell
  Q: I was wondering if there is such thing as a dynamic bit-field or any other way to implement it? To ...
  A: Short answer: no You cannot modify types at runtime - all types and their structure have to be ...
Test score12/9/2011vijayan
  Q: #include <iostream> #include <iomanip> using namespace std; { const int maxNumScores = 10; int ...
  A: Write a function to sum up all the scores: double sum( const double score[], int numScores ) { ...
C++ Compiler12/6/2011vijayan
  Q: Is it possible that install a compiler of c++ in mobile and run small programs with it? thanks in ...
  A: Yes. Though the specifics depend on the mobile platform. For example: ...
scope12/6/2011Ralph McArdell
  Q: How are you? Thanks for taking questions. In my *.h file I have this class class LargeFile { int x; ...
  A: Err, maybe because the function is an _instance_ _member_ of a _class_ and so needs to be called on ...
scope12/6/2011Zlatko
  Q: How are you? Thanks for taking questions. In my *.h file I have this class class LargeFile { int x; ...
  A: To call a method on an object, you need to have created an instance of the object. For example, in ...
scope12/5/2011Tehreem
  Q: How are you? Thanks for taking questions. In my *.h file I have this class class LargeFile { int x; ...
  A: That's probably because compiler is simply taking the function as an outside function which can be ...
scope12/5/2011vijayan
  Q: How are you? Thanks for taking questions. In my *.h file I have this class class LargeFile { int x; ...
  A: > void mergeFiles() > { > x=5; > } > The compiler says that x was not defined in this scope. But ...
scope12/5/2011Zlatko
  Q: How are you? Thanks for taking questions. In my *.h file I have this class class LargeFile { int x; ...
  A: The mergeFiles function you have written is not part of the LargeFile class. To make it part of the ...
scope12/5/2011Ralph McArdell
  Q: How are you? Thanks for taking questions. In my *.h file I have this class class LargeFile { int x; ...
  A: Sorry but no, the declared and defined function mergeFiles is not a member of class LargeFile; ...
How to compare two 2D array and display the rows that do not match12/3/2011Zlatko
  Q: This program i am trying to do is to compare two 2D array and display the rows that do not match, ...
  A: Before, you were comparing a 2D array against itself. For that reason you wanted to avoid comparing ...
C++12/2/2011vijayan
  Q: Sir, i m a beginner in c++? Please recommend a c++ tutorial programe Online? Sir Can we make ...
  A: > What can i do with visual c++? Visual C++ is an IDE and C++ compiler; it is a tool to assisting ...
C++12/1/2011vijayan
  Q: Sir, i m a beginner in c++? Please recommend a c++ tutorial programe Online? Sir Can we make ...
  A: There are several online C++ tutorial sites; here are a few of them: ...
About Dots and Boxes Program11/28/2011vijayan
  Q: I read your previous post on the dots and boxes codes. I have a question relating to the same. How ...
  A: > How do we declare the following function- void print_grid(const grid_t& grid, std::ostream& stm) ...
Computer Games.11/19/2011vijayan
  Q: 1. Is Computer Games classified as a System or Application Software ?. Computer Games involve ...
  A: > If we use Joystick interfacing input device for the particular game designed, it will also require ...
Computer Games.11/17/2011vijayan
  Q: 1. Is Computer Games classified as a System or Application Software ?. Computer Games involve ...
  A: > Is Computer Games classified as a System or Application Software ?. > Computer Games involve ...
Convert visual c++ to linux c++11/15/2011vijayan
  Q: My name is srikanth and i am doing some breakpad related testing and i want to crash a specific ...
  A: C or C++ is platform agnostic; the language libraries do not provide any facilities for this. Start ...
Threads11/14/2011Zlatko
  Q: How do I wake up a thread, so that thread 0 can wake up thread 1 because there are not enough 0's. ...
  A: Hey is for horses. You can think of this as a producer/consumer problem. The fact that the total ...
C++11/14/2011Zlatko
  Q: Please i want to cheack for this code Sorted Doubly Linked List with Insertion and Deletion ...
  A: I hate to bring you bad news, but the code is having some trouble. When you are writing a program in ...
Threads11/11/2011Zlatko
  Q: How do I wake up a thread, so that thread 0 can wake up thread 1 because there are not enough 0's.
  A: Usually, a thread will be waiting on some resource and will wake up when the resource becomes ...
Dots and boxes game11/11/2011vijayan
  Q: I have written most of the program to play against the computer and understand what is supposed to ...
  A: Use a std::vector for the grid: #include <vector> #include <iostream> typedef std::vector<char> ...
Help turning psuedo code into c++ code11/10/2011Zlatko
  Q: Alright I am trying to write a program that will play Dots and Boxes, the common paper and pencil ...
  A: I would not store the grid co-ordinates (letters/numbers) in the grid, nor would I store the '+' ...
Help turning psuedo code into c++ code11/9/2011vijayan
  Q: Alright I am trying to write a program that will play Dots and Boxes, the common paper and pencil ...
  A: > char grid[input][input]; This is not valid C++. The number of elements in a C-style array must be ...

Page:   1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10  |  Next      All

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


vijayan

Top Expert on this page

Expertise

my primary areas of interest are generic and template metaprogramming, STL, algorithms, design patterns and c++09. i would not answer questions about gui and web programming.

Experience

over 15 years

Education/Credentials
post graduate engineer

©2012 About.com, a part of The New York Times Company. All rights reserved.