Beginners - September 2012 (Page 57)

Do I need a source file for each of my header files?
 
I've got a simple class that doesn't need a specific constructor or any functions, any need to make a source file?
[1 reply] : One word answer: no. Longer answer: The #include statement tells ... (by wohtp)
A little table
 
I'm making a table with 10 columns and 5 rows. I know one way to do this: #include <iostream> using namespace std; int main() { cout << " "; ...
[3 replies] Last: Okay, I got it! # include <iostream> using namespace std; int main(... (by Zincott)
c++ thing
 
when using the vector we can concatinate without specifying the size of the vector as shown in this exemple , # include <iostream> # include <vector> usin...
[2 replies] Last: You diserve one million dolars thanks a lot (by closed account 28poGNh0)
Help with a bit a of code I'm trying to make
 
First of all here's the code #include <iostream> #include <string> using namespace std; int main() { string ShoppingListItem ={"Cheese", "Fish", "Juc...
[2 replies] Last: I may brought the point across a bit wrong but you've gave me an idea ... (by DJLad16)
by snig
Fstream binary read and write.
 
Hello I'm currently working on a program that uses this type of code fstream fbin(textfilename, ios::binary|ios::out|ios::in) The program later goes on to a...
[1 reply] : [quote=snig] "The problem I am having is that when creating the fbin o... (by closed account zb0S216C)
by Aceix
Here this is very...
 
Why does the function func throws exceptions whiles it is not supposed to.?. PLS explain... Code: //exceptions specifications #include <iostream> u...
[8 replies] Last: Thanks - noexcept(); (by Aceix)
Sentinels, aren't those a variety of mutant-hunting robots from Marvel?
 
Greetings, Well, I started programming C++ like 2 weeks ago, and now i'm learning how to read data from files, using sentinels and using the function atoi in...
[no replies]
definition of multi-dimensional array failure
 
Hi all. I have a 4 dimensional array declared as such as global: char OurShapes ; And it's defined here: void fillshapes() { OurShape...
[5 replies] Last: You can not assign values to an array as you were doing in the first y... (by vlad from moscow)
by wohtp
Initializing a class member of a class
 
I have been looking through books and google for the past 30min. What they have to offer come painfully closed to what I seek, but not quite... Thus I reque...
[3 replies] Last: Yes, that is correct. Then the ctor for end is called passing x2 and... (by AbstractionAnon)
programming for time trial
 
hello everyone :D i need to record a time for an object to move from location A to Location B.. i got some hint that i have to use photosensor,controller an...
[1 reply] : 1. You need to somehow integrate the photosensor so that you can acces... (by Stewbond)
Classes and Vectors
 
Hi , I have been working on this for a while and I cant finish implementing this program. What Im doing is creating a program that prints out a bank statement. ...
[3 replies] Last: the compiler only says BUILD FAILED, and no errors are reported. I... (by AbstractionAnon)
Deep Copying implementation
 
Hello, I apologize in advance if there is something wrong in this post. I just registered and just read the rules. I am trying my best to follow them. If this ...
[2 replies] Last: No, it did not. It caused a bigger load of errors to show up. Anyway, ... (by Estaiferd)
by Rox
Why does my program crash when deleting a pointer in the destructor?
 
Hello! I canĀ“t understand why this program crashes. In main(), I declare char *name = new char; and pass it as argument in the Person constructor. When de...
[3 replies] Last: Is it up to the programmer to send a pointer returned by new and not ... (by Moschops)
by modic
How do you clear the screen?
 
Just a simple question. I would like to know for a game that I will make in the future. :) (of course I mean in the consle application)
[1 reply] : http://www.cplusplus.com/articles/4z18T05o/ (by Moschops)
by Aceix
Explanation needed...
 
May I know the meaning of these: if (!(func()) and if !(func()) if func(); is a function
[2 replies] Last: Thanks (by Aceix)
by beakie
Point closest to point along line
 
Why doesn't this function return what I expect? I put in: lineFrom = (0, 20, 0) lineTo = (0, 120, 0) c = (100, 20, 0) I expect r to be (0, 20, 0) but I get (0...
[6 replies] Last: these are just standards... standards i dont conform to. dont people ... (by TheIdeasMan)
Self taught and humbly seeking direction
 
Hi all, (hmm, I wonder how many people post on here with the desire to become a games programmer). As I've stated in the title I am self taught at writing in ...
[9 replies] Last: Guess it's just the attention seeking producers and winging customer... (by Moschops)
what is the meaning of this error message?
 
invalid operands of types 'double' and 'double ' to binary 'operator+'
[1 reply] : It means you tried to add an object of type double to an object of t... (by Moschops)
Copy C String from Char Array to Another Char Array
 
Hello, Let's say I have an array of char named arrayAlpha and it contains a C string. How may I copy this C string into another array of char? Let's say the ...
[2 replies] Last: Use standard function std::strcpy from header <cstring>. For example ... (by vlad from moscow)
Function object class for less-than inequality comparison
 
Hello forum, I have the following structure struct LuminaireProbability { //luminaire as an intersectable Intersectable *mInters...
[3 replies] Last: It iis simple to do with using lambda expressions. std::sort( mLigh... (by vlad from moscow)
September 2012 Pages: 1... 5556575859... 62
  Archived months: [aug2012] [oct2012]

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