General C++ Programming - August 2012

simple for loop question...
 
Is there a way to exit a for loop in c++ before the condition becomes false? Thank you!
[2 replies] Last: OK thanks a lot! (by AeonFlux1212)
Inline Assembly
 
I have been interested in learning it for a while does any one have any tutorials, or (free) books on the topic. Also, when would you use inline assembly in a r...
[no replies]
a weird behavior of gets()
 
when I execute it skeeps the name extraction like this way Enter the information of student nbr First name : Age : if you notice I can not enter the nam...
[11 replies] Last: The program works perfectly well , thanks to you Moschops ,but I have ... (by closed account 28poGNh0)
by ProfN
Re Use Constructor?
 
Ok lets say I create a class and the constructor. Back in the main code a create an instance of the class 'Example': Example e; Example(); When I try t...
[2 replies] Last: Thanks for the tip :) (by ProfN)
by Cye
Text to Speech Integration for C++ project
 
I have been trying to integrate the Text-to-Speech Tutorial (SAPI 5.3) from Microsoft msdn site http://msdn.microsoft.com/en-us/library/ms720163%28v=vs.85%29 an...
[6 replies] Last: This is also possible: cout << Response[rand() % 5] << endl; But, fo... (by soranz)
segmentation error
 
please help me i'm getting segmentation error in my program to convert and print an infix to postfix(polish) operation. #include <iostream.h> #include <conio...
[12 replies] Last: Very very thanks ne555 i sorry for doing such mistakes actually i'm ne... (by ankit2313)
Looking for a better word replacement program in cpp ,than mine
 
Hi all, I have written a word replacement program in c++. Can anyone write a better solution than this? Because this uses character arrays . #include <s...
[5 replies] Last: I suppose one shouldn't be just destroying white spaces in the origina... (by JLBorges)
variable datatypes in templating
 
Hi All, it might be a weird question but I wanted to know if I can have a class be templated on variable no. of datatypes. Like template < class A, class ...
[5 replies] Last: Taking it a bit further, this becomes a library: http://louisdx.github... (by Cubbi)
Knight tour problem
 
Say you have an empty chess board, and you have been giving a knight. And you ask, to move the knight in such a way that the knight will touch each square on th...
[1 reply] : http://en.wikipedia.org/wiki/Knight%27s_tour#Computer_algorithms (by Script Coder)
Got 3 sisters fighting in mind: (function object, function pointer, lambda function)
 
Hi Experts, I got 3 sister concepts playing and colliding in my mind. I know each can be passed to another function. All of them seem to me like alternativ...
[3 replies] Last: You guys are brilliant. :) (by softwarelover)
x86 protected mode: Access memory beyond RAM available?
 
Say you have 5MB memory installed and you access memory location 5MB+1 (linear, read or write doesn't matter). How does the 80386+ respond to this? Does it wrap...
[4 replies] Last: [quote=helios] Protected mode lets you use the entire 32-bit address s... (by Script Coder)
C++ Toolkit Library for Building Reports?
 
Would anyone know of a C++ Library toolkit which can be used for creating reports. I can find one called XportPro but it only generates reports in HTML and thi...
[5 replies] Last: http://stackoverflow.com/questions/58730/open-source-pdf-library-for-c... (by Moschops)
by nattam
binary search tree operations give me modifications as segmentation fault or no output is coming
 
#include<iostream.h> struct bstnode{int data; bstnode *right; bstnode *left;}*t=NULL; void insert(bstnode *&b,int k) { if(b==NULL) {b=new bstnode; b->da...
[3 replies] Last: yeah,i know (by parthaz)
how to divide a sentence contained in a string into words and push back to a vector.
 
Hello , I have sentence like " I am King" in a string or character array. I want this string to be placed in a vector<string> object. vector<str...
[6 replies] Last: I have solved this program finally , Thank you very much for your supp... (by srikanth chitturi)
Which data structure to use?
 
Hi I am trying to parse a file with the following hierarchial structure and store the information in a tree. nodeA +-nodeB ++-nodeD ++-...
[3 replies] Last: Which data structure to use? store the information in a tree. I th... (by Script Coder)
by ProfN
Issue with classes
 
I have programmed a couple of command line adventure games before but never used classes to do so. So I thought it might be easier to use classes, but I have a ...
[4 replies] Last: Should health, Attack, ect. not be private? (by Script Coder)
Function to print STL
 
Hi All, everytime I have to print out the vlaues in the STL. I end uup either using BOOST_FOREACH, or iterators or jsut counters. Is there a function, whe...
[2 replies] Last: create a template function in a header file that prints elements of ST... (by majidkamali1370)
Casting member function addresses
 
I'm trying to convert some code to OOP. I used to have this which worked fine: LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar...
[7 replies] Last: > is it C++11? Does this just disable default copy & assignment constr... (by JLBorges)
Finding common words in a file using lexicographical matching [ help ]
 
I'm supposed to determine and list the 50 most common words in a file. #include <iostream> #include <fstream> #include <string> using namespace std; ...
[2 replies] Last: //Get the filename. cout << "Enter the file you wish to have ... (by ToniAz)
How to replace a string with another string while given the number of word and not position?
 
Hello , I am trying to do a program in which the output should be : Please enter a string : Hello This is srikanth. Please enter another string : Rajesh. P...
[5 replies] Last: @srikanth chitturi Are you saying me? I have understood the task ve... (by vlad from moscow)
August 2012 Pages: 123... 31
  Archived months: [jul2012] [sep2012]

This is an archived page. To post a new message, go to the current page.