Beginners - March 2011 (Page 27)

Constructors (1,2)
 
What advantage is there to using my own constructor to using the default constructor? And am i right in thinking that constructors are functions which initia...
[25 replies] Last: The number of posts is counted from how many posts the person has made... (by filipe)
Mechanics of "Lines of Code"
 
Suppose you develop a project with a certain LOC of your own but you use custom libraries, obviously libraries are themselves already compiled (no such thing as...
[7 replies] Last: [quote=Gaminic]They told me this was an industry standard Unfortunat... (by Return 0)
Using the struct tm.
 
So I am trying to use the tm struct to get the minutes second and hours I have tried the following #include <iostream> #include <time.h> using nam...
[3 replies] Last: Thanks man, worked perfectly :) Now I just gotta use those values for... (by Number1awa)
Reading a .dat file
 
I have a .dat file that contains this: @Q@ €J@ O@ €L@ ÀX@ ÀS@ €Q@ O@ ÀQ@ N@ X@ €J@ ÀV@ ...
[18 replies] Last: It's still a bad idea. http://www.cplusplus.com/forum/beginner/38595/#... (by Bazzy)
Using Strings as variable names (again I know))
 
Hi all, I am trying to use some strings to initialize variables, and I have read previous posts on the related issue, but I do not know how to utilize them o...
[9 replies] Last: I am unsure why so many people wanted to know exactly why I want to to... (by jasonyctam)
Can this be done?
 
I want a count down sort of program, but instead of counting the number and outputting it one by one in new lines or in rows, how can I have the screen refresh ...
[9 replies] Last: LOL sorry...Jus joking. Any ways, ultifiinitus, if you don't mind, co... (by spoon licker)
My vector problem solved
 
I posted a problem the other day about declaring vectors in header files and have now solved it after a week. It turns out all you have to do is use a ".cpp" fi...
[1 reply] : Sounds like "programming by coincidence". The only difference between ... (by filipe)
how do I create a template structure of template nodes?
 
My problem is that I need a container (i.e. vector<>, deque<>, list<> etc) which holds something of a template type. The only problem is that I need to be a...
[10 replies] Last: EDIT: SOLVED PLEASE DO NOT RESPOND I am adding to this rather than ... (by Chazzmundo)
Error that I can not figure out.
 
I am getting an error but I do not know why. But it should be a simple fix but I am just not seeing it. Function: template<typename generic> void BST<gene...
[5 replies] Last: @Framework: That would be bad. You'd be storing the address of a temp... (by PanGalactic)
How to concatenate elements of char* array while using loop? Inexplicable behaviour of strcat.
 
Hello,guys.Need your advice. I'm unsuccessfully trying to concatenate two strings, two elements of a pointer array by using strcat in for loop. I just can't com...
[4 replies] Last: Thanks a lot everyone (by andreychernukha)
DOS File Name
 
Using windows file naming system I can use any length of file name, but when reading the same under DOS environment the file name is converted like "abcdef~1.ex...
[1 reply] : You can't. DOS filenames were restricted to <8 characters> '.' <3 c... (by Duthomhas)
vector<string> segmentation fault and skipped input
 
Hi, I'm pretty new to C++ and am working my way through some tutorial exercises. I am stuck on an exercise where I am supposed to use vectors and push_back t...
[3 replies] Last: cin received eof, so you need to clear its state: cin.clear(); (by filipe)
by ogward
typeid
 
Hi! Why cant I access get and setRadius()? And no, I dont want to use dynamic_cast. #include "Circle.h" #include "Rectangle.h" int main() { _Cr...
[6 replies] Last: oh sorry, thanks for the help! (by ogward)
v.c++.2008
 
is there any detailed documentation about using and creating classes in visual c++.2008 ?
[2 replies] Last: If you want a tutorial on C++ classes, see http://www.cplusplus.com/do... (by Bazzy)
operator overloading
 
1-what is the difference or the pros of using dynamic allocated array (using new) over typical array? 2-in the next ex. Date &Date::operator==(const Date &...
[2 replies] Last: thank u (by over the top)
Another newbie question
 
Just start read book Kernigan & Richi Trying to test their examples to my system (Ubuntu 9.10) This one don't want to work. #include <iostream> #inclu...
[2 replies] Last: thanks a lot ! (by janibeg)
Error: LNK2019
 
First off, my code in its entirety is here: http://codepad.org/fcOLWhWs I have three classes: an ordered list class which is composed of a binary search tree...
[4 replies] Last: That's exactly what it was firedraco. I didn't have any sort of const... (by bardicer)
static pointer data member
 
I have switched from c to c++ recently for my project. I am facing difficulty in initializing static pointer. Here is some what similar code in my project file1...
[3 replies] Last: Alright, no problem. basically a class has three ways of storing meth... (by ultifinitus)
C++ Function Error
 
Hi everyone, I'm basic in C++. I'm using Dev-C++. This is my code I'm using but there is an error. Can someone tell me why? #include <iostream> // functio...
[4 replies] Last: Awesome, thank you, :). that's my hugest problem in coding, is syntax.... (by NightJay0044)
Word count from input file problem
 
Hello, I'm a C++ student trying to finish an assignment. My level of knowledge is pretty basic. The assignment requires the program to count the amount of words...
[3 replies] Last: counting just the spaces might not be enough. There can be a case wher... (by subith86)
March 2011 Pages: 1... 2526272829... 52
  Archived months: [feb2011] [apr2011]

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