Beginners - September 2010 (Page 29)

by juvan
Time flies while programming
 
"Time flies while programming and in the end there isn't all that much to show for." This is a basic idea behind this post. Firstly I have no idea if this ki...
[1 reply] : Time flies while programming for me too :D And after my program's fin... (by xander333)
by dlugo
Issues with file.get(x) and arrays"
 
Let's say I have a file with the following store: AAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAA BBBBBBBBBAAAABBBBBBB BBBBBBBBBAAAABBBBBBB And I use ifstr...
[4 replies] Last: I did a little more test and added a coordinate system it looks roughl... (by dlugo)
How to do algorithm type functions?
 
Ok, how would I get my MS-DOS prompt calculator to allow the user to inter multiple integers, and then add/multiply/etc them together? I've done this before, bu...
[4 replies] Last: A do while loop would be better for mike246's program ;) (by LB)
retreiving elements from a pointer to 2darray (blah[][])
 
Hi I'm intending to create and store a pointer (to store in GameBoard::m_panGameBoardArray) pointing to a 2d array (anBoard ). Send that pointer as an argument...
[3 replies] Last: Thanks. This advice was quite useful. I am however going dump arra... (by MickyCodes)
problem declaring a vector within a class
 
I'm trying to declare two vectors within the private section of a class "rover" I am working on. #ifndef ROVER_H #define ROVER_H class r...
[2 replies] Last: You shouldn't have using namespace std; in a header file. (by Galik)
Finding largest and smallest integer
 
I am working on a project in which I have to find the largest and smallest integer in a set of 5. My problem is this: If the list of numbers is ascending in ...
[7 replies] Last: Thanks for pointing that out, Bazzy. Everything is working perfectly n... (by kultrva)
using char[] within class through function..
 
I'm sorry, I'm really slow.. lets say I have a class "DAD" and I want to use the pointer to the DAD class, then I want to send another char array to the functi...
[4 replies] Last: Hi Fun2Code, So far, having a progress with your help! thanks so much!... (by keewong)
Array in function prototype
 
When writing function prototypes that just contain ints, etc, as parameters, I usually just omit the name of the variable, like: void oneFunc(int, int); ...
[5 replies] Last: Square brackets are not the array or anything else countable. It is ju... (by EverBeginner)
I dont understand the point of constructors in C++?
 
I have a record of over complicating concepts, and Im sure Im doing the same in this part too. I dont understand why constructors are used, Ive been told it's n...
[14 replies] Last: ^^ Glad to help. (by Disch)
using integers in string arrays
 
I was wondering if I could have an integer value in a string array. For example: const string WORDS = { {"wall", "Do you feel you're b...
[3 replies] Last: Since the structure of all entries is the same, you can also do it lik... (by Null)
calloc
 
Whatever I put as the arguments of calloc(..)... int *v; v =(int*)calloc(2,2); cout<<sizeof(v); the output come the same..Is it printing the size of t...
[12 replies] Last: ..the howstuffworks link explained it in a nice and friendly way...tha... (by manasij7479)
strncat null termination
 
according to http://www.cppreference.com/wiki/c/string/strncat it says char *strncat( char *str1, const char *str2, size_t count ); The function strncat...
[1 reply] : Exclude. http://www.cplusplus.com/reference/clibrary/cstring/strnca... (by Galik)
custom vector class
 
so i want to make my own vector class with functions that i use regularly like writing the array, inserting an element, sorting .. that sort of stuff. and i ...
[6 replies] Last: [quote=Kyon]Brilliant, yet horribly slow. I recommend using a regular ... (by m4ster r0shi)
Issues with a inventory system
 
I am creating an inventory system for a school project however i have hit a snag i have declared vector<string> inventory; declared in a global.h file, as ...
[10 replies] Last: i am sorry the "" what ever title i gave the bool. Such as bool bar... (by pathios)
Compilation errors in a subclass... very confused.
 
I'm programming a simulation of a harbour: there is a superclass, "Ship", which has two subclasses, "CruiseLiner" and "ContainerShip". "ContainerShip" then has ...
[1 reply] : You haven't told the .h file what Harbourmaster is, you don't need the... (by quirkyusername)
by jagoly
For loop instead of goto
 
okay. I am very new to to C++ (i just started learning it a week ago). I am making a command-line Final Fantasy quiz. here is my current code for the first ques...
[6 replies] Last: hello. I am having more problems with this. the fact that any letter I... (by jagoly)
web development in C++??
 
Hello again, Like I said in a previous post, I'm a front-end web developer with a background in Java. I'm teaching myself C++ just for a hobby. I've been ...
[2 replies] Last: You can use a C++ program as CGI, I know there's also a library to do ... (by Bazzy)
by btripp
Templates with a .h and a.cpp file??
 
From my understanding templates need to be in one file. I thought you couldnt have the interface and implementation split up when using templates. My teacher ju...
[1 reply] : All of the template functions in the .cpp need to be moved into the .h... (by firedraco)
RunTime Termination for the Multiplication Function for Extremely Big Integers
 
Good Day Everyone! I have a code that adds and multiplies really large integers but it seems that my multiplication function (string multiplyLargeNumbers(strin...
[no replies]
Function that reads .txt into a struct
 
Okay, so for my CS15 class I need to write a function that reads the data from a .txt file into a struct. I'm close, but I keep getting just a couple errors....
[3 replies] Last: Your function loadFile() is expecting you to pass in an array of type ... (by Galik)
September 2010 Pages: 1... 272829303132
  Archived months: [aug2010] [oct2010]

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