Beginners - May 2015 (Page 27)

BattleShip - Fill Board with Ships
 
Hello there. I'm making the BattleShip game and I'm having some problems to fill the board with ships. void Board::putShip(const Ship &s){ int s...
[no replies]
ROCK PAPER SCISSORS ERRORS
 
I need to create a rock paper scissors game for a uni course that has the following problem. "We want you to implement a simple Rock, Paper, Scissors game ...
[1 reply] : 70: The correct header file is <cstdlib> for C++ usage. 105: refere... (by AbstractionAnon)
Using STL on matrix?
 
Hello. May I use STL algorithm on char matrix? bool isdot(const char &s) { return s == '.'; } int main() { char matrix ; do { //... } while (!all_of(m...
[8 replies] Last: Traversing a row would be easy, as you may simply use the pointers to ... (by ne555)
Simple way to draw graphs
 
I'm totally new to c++ and programming in general,I used to draw graphs in q basic with a simple command(pset), is there a similar way to draw graphs in c++?
[no replies]
hh:mm:ss - time format
 
i have to create c++ program. The program requires the time format hh : mm : ss and check the correctness of the input , eliminating the appropriate report , s...
[8 replies] Last: thanks everyone for help and ideas i just added one more function that... (by VaMpZzz)
word guessing game
 
need help with this task :) Make the game " word guessing " . Prepare an array with at least 20 words. Starting off with the occasional help of a generator...
[5 replies] Last: don't be jealous, everyone starts somewhere :p (by VaMpZzz)
More than a customer
 
Hi, sorry for my English it's not my first language, i'm working on a bank project for school,the project says : "Use inheritance to modify your code to accep...
[3 replies] Last: As keskiverto said, this seems a really odd (read bad) way of designin... (by lopella)
Assign list to multiset
 
Hello. What's the right way to assign list to multiset. list<int>randoms; multiset<int>freq; //empty Static_cast won't work?
[4 replies] Last: Calling erase while iterating over the multiset is a bit tricky. I c... (by mighty asker)
question about pointer and dynaminc memory
 
why i can't write code like this:"int* p =new int* " and must write" int* p;p=new int ;" sorry my english not very will,i hope you can read it. thanks for h...
[1 reply] : new CandyBar This will create an array of 3 'CandyBar' objects. I... (by Disch)
by s8050
How to send a console app via social websites?
 
I need to send applications I made via social website.. when sending any files of known kinds of programs, it's all right. but when I try to send an applicati...
[1 reply] : considering that someone might have the same problem, search for it, a... (by s8050)
Associanting strings to values
 
Hello, I'd like to associate strins to values. I need to do a program that asks the user a grade but he inputs it as string and this string equals a value. And ...
[10 replies] Last: Not that but let's imagine: I do int n=str1.find("N") +1 But how ... (by PedroFr13)
by savanh
question
 
i have this code and when i try run it does not work ,i try to understand how can i inhertance from template base class , the error in "class choco:public cake<...
[1 reply] : Line 9: Your constructor is incorrect. The constructor must be choco... (by AbstractionAnon)
enter key auto :)
 
what is a code for automatic enter? :) like when you cin>> letter and it automatically gets posted? :)
[7 replies] Last: yep it worked ;) thank you ;) (by VaMpZzz)
structures in c++
 
for the below code, given input : a b c d e f g h i j k l the output comes out to be: a b c d e f while i expected it to be: b a ...
[6 replies] Last: I don't know precisely the inner workings of io streams, so you may wa... (by maeriden)
Removing a number from a Linked List
 
Quick question, I need this program to remove a number and print the remaining numbers from the linked list I run the program and it works fine until I enter a ...
[1 reply] : I think node before deleted node is point to nothing (by LendraDwi)
by WJM
Vector error
 
I keep getting these errors: ||=== Build: Debug in Oefen (compiler: GNU GCC Compiler) ===| |In function 'int main()':| |15|error: expected primary-expression...
[2 replies] Last: Thank you (by WJM)
How to store user input in variable that is a different value than in the variable initialization in default constructor?
 
Sorry for the lengthy title of this post. However, I believe it sums up the issue I am having. I have a default constructor that sets these defaults every time ...
[2 replies] Last: ... (by maeriden)
How to send value to multiple constructors at object definition?
 
I have a simple program that determines the radius, area, and circumference of a circle. I want to have three constructors: the default constructor should sets ...
[5 replies] Last: Circles sphere(8); Circles sphere(9,10); These lines define... (by maeriden)
by zakkor
Inheritance alternatives?
 
Hey there! I have a class called `Item`, and another class called `Container`, which inherits `Item`. I add all `Item` objects to a vector<Item>. When addin...
[7 replies] Last: intuition, lol. that is always the reason. besides it doesn't sound li... (by nadurraXII)
by savanh
need help
 
what the problem!! first code supose to be implimntation of my code #include<iostream> #include<string> #include"f.h" using namespace std; weppage::we...
[3 replies] Last: f1 is not a constructor, add return data type before function (by LendraDwi)
May 2015 Pages: 1... 2526272829... 40
  Archived months: [apr2015] [jun2015]

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