Beginners - May 2011 (Page 46)

battleship help
 
So I'm making a battleship program and I'm having a little trouble trying to figure out the attack s...
[4 replies] Last: Hey thanks that worked. But what was it that you did? just declared th... (by smr0930)
Namespaces, go figure...
 
So I am reading a c++ book, and this exercise shows up to question my knowledge about namespaces: ...
[5 replies] Last: ooooh, thanks a lot coder777, this namespace thing is confusing withou... (by ProbePLayer)
Okay, now I have no output. Parsing help!
 
I need to take an input file that contains name listed like: John Henry Mary Baker and create an ...
[6 replies] Last: Yes, I just emailed my instructor and he said the same thing. Actually... (by andimiami)
by mishoo
Inheritance question
 
I used to be good in these but for anymore. I have following code: class A { public: A(){...
[2 replies] Last: #include <iostream> using namespace std; class A { public: ... (by hamsterman)
How to display length/width of binary tree (1,2)
 
//keith lin, this is one of the original keith program since it's very few. April 29 2011 project 5...
[22 replies] Last: Yes, that's the problem. I did not declare any pointer, the only point... (by jimmy5023)
by firix
substring for both reading and writing
 
Hi, I want to define a substring that can be used for both reading and writing but I am not comp...
[no replies]
default constructor help
 
making a class, don't know how to make the default constructor #include <iostream> using namespa...
[5 replies] Last: A better way would be with initialization list: [code firstline=16]Sch... (by Bazzy)
recursive function
 
i have this code this code checks the string t in string s and tells that string t contained in stri...
[4 replies] Last: done thanks hamsterman(2185) it works now i am able to submit my assig... (by AliRiaz)
by mora78
Euler method for ODE in c++
 
Hi Everybody I am beginner in c++ and I need your help plz. I implemented euler method for solving ...
[no replies]
Unable to open file
 
Hi there, I'm having issues opening an input file stream and was hoping someone had some insight ...
[2 replies] Last: I cannot believe I didn't see that. Thank you. I'll give it a try an... (by abrumit)
by caneta
Fill a polygon
 
Hi everyone. I have an array of pixels which can be black or white (values 0 or 1). This array repr...
[2 replies] Last: I don't know how to recognise the corners of the polygon Check the n... (by ne555)
Problem with increment operator
 
I have two classes. In the first I create a node with left right pointers, a templated data member (...
[3 replies] Last: Thanks for the pointer information! That was the problem! I had the ... (by zantocon)
Frustrating "redefinition" error
 
I have a simple header file and a cpp file. In the header I am declaring a class, and in the cpp...
[6 replies] Last: With the fix I detailed above, the two compile without error or warnin... (by Moschops)
Mixed loops?!
 
Ive been messing around with loops lately and I noticed how strangely for loops behave in a while...
[3 replies] Last: Doesn't int i = 0; "initialize" it? It does. But line 2/7 doesn't. ... (by coder777)
Error C3861 issues
 
Hi guys, I'm relatively new to C++ and I'm in the process of putting together a physics engine for ...
[3 replies] Last: It has. Thanks for the quick response, Xander. (by bensdixon)
Hi Template Questions
 
I have a template question about my program.I put my question in the code. void Interface::uns...
[4 replies] Last: Is the normal rule that functions implemented inside the class declara... (by anonymous23323124)
Filling a string array with lines from a text file
 
I'm making a small educational program for my university course and I have a text file that goes lik...
[1 reply] : Doing this with STL it goes like this: std::ifstream is(...); // nee... (by coder777)
Elements of a String
 
I'm trying to declare specific elements of a string and failing horribly. #include <iostream> #...
[9 replies] Last: You're welcome :) (by GodPyro)
Converting ints and doubles and floats.
 
#include <iostream> using namespace std; template <class T> T funnyfunc(T val1, T val2, T va...
[5 replies] Last: The idea of 'runprogram' is that you put the whole program in it (or m... (by Disch)
What does '\0' mean here?
 
int main(void) { char cAlphabet = {'I',' ', 'k','n','o','w',' ','a','l','l',' ','a','b','o','u...
[2 replies] Last: its quite useful if you want to iterate through each character of a st... (by ascii)
May 2011 Pages: 1... 4445464748
  Archived months: [apr2011] [jun2011]

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