Beginners - May 2011 (Page 11)

by Veltas
Problem with stream input (1,2)
 
For some reason I keep on having trouble getting input from the stream using the get member of cin in particular. Here is the section the problem is occuring i...
[26 replies] Last: cin.get() takes the characters from the input stream, but leaves the ... (by guestgulkan)
by bacpp
using automake and autoconf with C++
 
hi, I have written the Makefile.am and autoconf.ac files and am looking to build my project by providing the following commands: $autoreconf -f -i -m $./conf...
[no replies]
Can anyone help me with this sort?
 
So i've made an alphabetical sort, and after using it and trying to get it to print the new values, all the values are blank. Maybe someone can help me figure o...
[4 replies] Last: Sorry. I guess a 2nd pair of eyes is needed sometimes. I've made many ... (by closed account D80DSL3A)
Compiling c++ in terminal
 
I just upgraded to Mac OS X 10.6.7 and now using the command g++ xxx.cpp -o xxx to compile isn't working. What do I do?
[9 replies] Last: On my system, gcc lives in /usr/bin/ I've no idea about yours. (by Moschops)
by bbcc
class
 
could any one help me with this please: AIDA::IAnalysisFctory* aida = AIDA_createAnalysisFactory(); aida is a pointer to the class IAnalysisFctory ...
[1 reply] : :: is a scope resolution operator. In your case AIDA is probably a nam... (by hamsterman)
How to fill x[i] from array[8][8]?
 
#include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv ) { srand (time(NULL)); int pole = {0}; ...
[4 replies] Last: Are you just trying to use for loops to convert between 1D and 2D arra... (by moorecm)
by dandy
[help]type casting
 
#include <iostream> using namespace std; class A { int a,b; public: void operate() { a = a + b; b = a + b; } }; int main() {...
[6 replies] Last: Technically there's no possibility of a vtable here, since A follows t... (by Disch)
having trouble with doing swap function
 
#include <iostream> using namespace std; int swapName (int first,int second); int main() { int a=5; int b=10; swapNumb(a,b) } void swapNumb (int &fi...
[1 reply] : Could it be because your function prototype doesn't match your functio... (by packetpirate)
Using SDL in Microsoft Visual 2010
 
I was attempting to do a tutorial from this link. http://lazyfoo.net/SDL_tutorials/lesson01/windows/msvsnet2010e/index.php I downloaded the SDL-1.2.14 v...
[6 replies] Last: This is how it's supposed to look like: #include "SDL.h" int main ( in... (by coder777)
Why doesn't my catch work?
 
#include <iostream> #include <exception> using namespace std; class X { virtual void whatever(){}}; class Y : public X {public: int a;}; int main() ...
[1 reply] : See http://en.wikipedia.org/wiki/Dynamic_cast. An exception is only t... (by webJose)
by LB34
Help needed to understand how reference of a vector works as function parameter
 
Hi, I'm a newbie in C++. I'm facing weird behavior when pass a vector as reference to my function. Here's the code snippet: void TransposeMatrix ( vector<in...
[1 reply] : Note that your for loops are different. This is why passing by value g... (by hamsterman)
Parse a string for integers
 
I have a string that holds a date in the format of "Year Day Step" That is, for example "2011 98 129300" I want to take this line and assign the year/day/step...
[5 replies] Last: This works much better now :) World::Time::Time( const std::string& a... (by Gladdok)
by narren
Loop error in segmentation project/OpenCV
 
Hello everyone. It's my first post in here. I'm trying to create a program which will group objects in the picture. The result should be: all elements of the s...
[6 replies] Last: Sorry for so long silence. I've been working on this program. A lot of... (by narren)
extract words from string
 
I try to read words from text file and store words as strings. I use getline(fin, *word, ' '). But when it met '\n' or other punctuation characters, it didn't ...
[2 replies] Last: It requires const char * delimiters while delimiters change. I don't ... (by redriller)
Anonymous objects
 
Hello, I'm new on this forum and currently writing a thesis on traffic simulation. For this thesis I'm writing a simulation program which is triggered by e...
[2 replies] Last: If you want the same variable to be used for each loop iteration, just... (by anonymous23323124)
Help
 
this is my code i when i execute the program and select the items for customer david the total items selected in add to cart menu and total costs will be calcul...
[1 reply] : #include <iostream> using namespace std; int validity(string ,strin... (by raptor85)
STL Queue Questions
 
Coding Below. Queue confusion on this project. I stopped and posted because I do not want to butcher my code anymore. I need to have user input how many soldier...
[1 reply] : I don't understand what you are trying to make. What is the point of u... (by hamsterman)
Function Pointers and void*
 
I'm trying to initialize an array of function pointers. my typedef: typedef void (*fPtr) (void*); Array/initializers: fPtr p = {palindromeCheck, postFi...
[5 replies] Last: Here's what I came up with if anyone is interested: void SSTool::funU... (by rocktheartsm4l)
For-loops
 
How could I get a program to generate something like this? It displays 1 and 2 the same increasing amount of times until it gets to six. 1211221112221111222211...
[4 replies] Last: How about this silly method? It needs just one for loop! @pastamaker: ... (by closed account D80DSL3A)
by Skills
Array with functions
 
how to create a function that will print array.....
[5 replies] Last: check your email. (by tomararun)
May 2011 Pages: 1... 910111213... 48
  Archived months: [apr2011] [jun2011]

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