Beginners - December 2010 (Page 7)

What is a string literal?
 
I'm reading this book, and don't quite understand what it means when it is talking about string literals. It has this example code: const char * bird = “wr...
[3 replies] Last: That's right! -Albatross (by Albatross)
Why normally declare variables when you have pointers?
 
I'm just now learning about pointers, and read about the new operation: //example of using new int * pointer = new int; If you can do this to create a ...
[9 replies] Last: By changing to which block of memory a pointer points without storing ... (by Albatross)
Reading files with \r\n
 
I'm having problems reading files with the Window's newline delimiter. For some reason the fstream read command ignores all '\r' characters, but when countin...
[2 replies] Last: Thanks! That worked perfectly. So I take it that even though openin... (by helloworld922)
Question about classes
 
In the following code I have the constructor which saves certain values to the class variables. I've read how to do this in the past but can't for the life of m...
[3 replies] Last: +1 to quirkyusername if you want a variable to hold a string, use a... (by Disch)
String of Ints?
 
Okay, let's try something else. I have this; string input = "0 1,2,3"; I need to discard the first integer and plug the comma-separated ones (discari...
[2 replies] Last: O.O i <3 u 4ever (by kresentphresh)
dos.h
 
what is the use of the header file dos.h and what re functions available through this header file???
[11 replies] Last: I see. Thanks for the clarifications. (by filipe)
by CWB
Quick question about freeing up allocated memory.
 
I have a random question about memory allocation. If you allocate memory to a local variable and do not free it during the program because you don't think you'l...
[1 reply] : All memory is freed when a program exits. It is bad to allocate memor... (by kooth)
stuck in a simple program :( (area)
 
so i decided to make a program in which u have area given and base/height etc . so lets say the sum is area=11.6 base=? height=2.9 the ans should ...
[5 replies] Last: omg!! .. . lolz my bad ..how did i mis looked ..ok problem solved than... (by im abcd)
hide local identifiers in C
 
in C , I am writing some header files and i want them to hide their local identifiers so that i can use those same identifiers used in the headers in the main p...
[no replies]
conio.h - portability issues
 
I've been programming a command line 'text editor' The problem I'm facing is that, I want to make the implementation OS independent. That is, I'd like my code ...
[5 replies] Last: you also can use this header file for linux systems and conio.h for wi... (by chathura666)
by cmccmc
error
 
Pretty much what im trying to do is reverse an entered string. I haven't used C++ in a couple years (I've been working with Java) and im trying to get back into...
[3 replies] Last: Yeah, but if you put it a decently long string you might overflow the ... (by firedraco)
by vlad61
arrays on Pancake Glutton
 
http://www.cplusplus.com/forum/articles/12974/ Thats the Exercise I am trying to do. #4 on the list "Pancake Glutton" #include <iostream> #include <cstdlib>...
[8 replies] Last: Yeah i do like your suggestion. even though mine worked I dont like th... (by vlad61)
by ToniAz
Syntax Trouble
 
Hello everyone! I am having a bit trouble understanding what the following line does: virtual int operator()(Key & k) = 0; where this declaration...
[5 replies] Last: Besides being a pure virtual function, it is also a function call oper... (by sohguanh)
UPDATED: Need a little assistance...
 
EDIT: Forget it
[no replies]
Soft-Deleted
 
*EDIT* Since you can't delete a thread, this is the next best option.
[2 replies] Last: You are certainly right - I could learn every piece of C++ syntax in a... (by kresentphresh)
by nick85
Is C++ here to stay? (1,2)
 
Is C/C++ here to stay or is it going to be replaced in the near future?
[39 replies] Last: As far as fun is concerned, many games from 10 or 20 years ago are st... (by sohguanh)
by nick85
What language should I learn next (if any)?
 
I know C/C++ (I'm still learning though), Java really well, C#, actionscript, some assembly and some python. I'm interested in graphics programming and I'm a f...
[10 replies] Last: Focus on algorithms, data structures, and abstract programming concep... (by sohguanh)
by clomer
file io
 
Hello, Im learning c++ and I'm not getting file io. Im practicing making a little program, I have a customer array of structs with various member type like c...
[1 reply] : struct Foo { int n; std::string s; }; Foo f; std::ofst... (by filipe)
what does that means
 
can anyone tell me what does srand((unsigned)time(0)); means ??
[1 reply] : Sets the random seed to the current Unix time See http://www.cplusplu... (by Bazzy)
array solution !?
 
already been answered thanks by Return 0
[13 replies] Last: I know time is an issue so if you think you can pull it off START A NE... (by Computergeek01)
December 2010 Pages: 1... 56789... 35
  Archived months: [nov2010] [jan2011]

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