General C++ Programming - June 2011 (Page 15)

by maruf
number of multiple occurence of a word in a string
 
is there any stl containers which will return the number of multiple occurence of a word in a string ?? example : line : hello world hello hello word : h...
[1 reply] : No, however there are functions that can fetch the sub-string of a str... (by closed account S6k9GNh0)
overloaded operator=
 
I have used class overloads of operators many times before, including overloading operator=, however for some reason it is not building in this particular insta...
[7 replies] Last: I guess I might as well make it non-const just to go with standard con... (by whitmcrae)
Issue With Inherited Template Class
 
General.h template < typename __IndexType__ > class ParentControlledIndex { // Member declarations. }; class ControlledIndex : public ParentCont...
[1 reply] : Never mind. With vCast( ) being a member of a non-template class, de... (by closed account zb0S216C)
Is There a Difference Between These Two Declarations?
 
As the title says, is there a difference between these two const declarations: int iSomeValue( 10 ); const int &rRefDeclOne( iSomeValue ); int const...
[1 reply] : None. (by webJose)
by timmy
check out what's wrong in this code....
 
#include<iostream> #include<conio.h> #include<fstream> #include<string> using namespace std; int main() { ofstream s1,s2; string name1,name2; s1.ope...
[7 replies] Last: thanks a lot m4ster r0shi...it's working now.. (by timmy)
problem with get as text
 
hello. I found how to write on .txt in tutorial and now i want to get data on .txt on the screen. how do i do this? please explanation. tanks for your...
[11 replies] Last: visual studio 2008 some of the order of c++ don't run. (by knight0black)
Overloading problem
 
Hello all, I have a frustrating problem. I'm creating my own vector files (for some noise calculations, doesn't matter). I would LIKE to have a function for ...
[4 replies] Last: Hm! That works! Thank you very much! I have never come across that dur... (by Anvariel)
by GPP
Defining an array in a .h file.
 
Hello, as my projects grow larger Im trying to Define an array in a header file, and use it elsewhere. Im using Codeblocks. ar.h #ifndef ARRAY_H #define ...
[3 replies] Last: ar.cpp #include "ar.h" int arch ; You must set both "ar.cpp" and ... (by Duthomhas)
String NULL?
 
I'm not sure how to ask the question so I'll let the code do the talking. :P Example 1: // Global value char returnValue = {0}; // foo function to do awes...
[13 replies] Last: Its in the Standard http://www.cplusplus.com/reference/clibrary/cerrno... (by Duthomhas)
by anjy
read preexisting file
 
hi everyone could u plz help me in doing this work . read first 32 charcters of a preexisting text file and then find out ascii value of each character then t...
[1 reply] : Reading files : http://www.cplusplus.com/doc/tutorial/files/ Char t... (by hamsterman)
by minix
Image to Text convertor
 
Hello everybody, Do anybody know about "Image to text convertor" library or any program for same purpose like google docs. Thanks, Anand Rai http://in...
[4 replies] Last: Yes, Tesseract results are good and its open source. It is hosted on g... (by minix)
by anjy
read preexisting file
 
hi everyone could u plz help me in doing this work . read first 32 charcters of a preexisting text file and then find out ascii value of each character then t...
[4 replies] Last: The buffer is set to ) rather for educational purposes. Specially in t... (by adzajac)
Lexical and Semantic layer
 
Hi Im doing some past exams for "Programming languages and algorithms" paper and there is 2 mark questtion of "what is the difference between lexical a...
[no replies]
Strange issue with memory consumption on UNIX
 
I'll need to store huge amount of heterogeneous data in the table like structure, where each object reflect to single cell. To do this I've created small exampl...
[6 replies] Last: main question is how many memory is taken by the system to manage the... (by kbw)
OpenGL
 
Hi there!! I've been doing a bit of OpenGL lately, and I manage to get a spinning cube on the screen, but I don't understand the following, can anyone please...
[4 replies] Last: Now I get it. Thanks FR3DDIE (by FR3DDIE)
How can i convert an image file another image file?
 
#include <fstream> #include <iostream> using namespace std; int main(){long size,start,theend; char *c; std::ifstream file1("C:\\exam.tga",ios::in|ios::...
[1 reply] : You can either read up on how exactly both formats are stored and writ... (by hamsterman)
functions, arrays, and pointers
 
I am for the most part completely lost when it comes to this assignment. I am to write a function that receives an array of pointers to characters. Each pointer...
[2 replies] Last: You mean you need to sort them in not alphabetical, but logical order?... (by hamsterman)
Help sloving a loop problem?
 
I know how to create loop, but we have to create a loop and have the option of stopping at any time. I want my command to say "Press Y to leave command or else ...
[2 replies] Last: First, You should use code tags. About your problem: Remove the in... (by Nisheeth)
by LB
(*a->b) versus (a->*b)
 
Consider this case: struct A { int* b; } *a; Which of the following is more efficient to use, and which do you recommend to use? (for both setting and getti...
[5 replies] Last: You could do that but that gives you the address of b.a , not a point... (by Mathhead200)
Color detection & comparing function
 
Hi there programmers, i need your help. You see, i was trying to make mi first genetic algorithm project, so i decided to make one about a program that evolv...
[6 replies] Last: The basic layout of a pixel manipulation function looks like this: 1. ... (by helios)
June 2011 Pages: 1... 1314151617... 28
  Archived months: [may2011] [jul2011]

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