Beginners - November 2011 (Page 22)

a string object for a class?
 
Ok, so I have a class, and one of its "variables" is a string object. The constructor for the class takes a string argument, and assigns it to that string objec...
[14 replies] Last: It worked!! :D Thank you for your help! :3 (by jp01cf01)
by erikn
STILL don't understand pointers?
 
i thought i had a handle on this months ago. the way i understand it is that a pointer is a block of memory containing another memory address. there's the point...
[16 replies] Last: +1 CodeMonkey, Catfish. array names are cast to pointers to their... (by Disch)
passing pointers
 
Hey guys I was just writing a simple tree structure that returns a node pointer when a node is created. The compiler will not let me do so as it says that "Err...
[4 replies] Last: Oh ok I got it. Thank you! (by looptesting)
Error Compiling LNK2019
 
Hey everybody, I'm having a problem getting my project to compile and I'd appreciate your feedback. I'm in my first semester of C++ in school so this is probab...
[2 replies] Last: Thank you for the reply and please excuse my ignorance when it comes t... (by fritzOSU03)
by dean
ctor with references
 
Hi, quick question :) given the sample: struct A{ Node n; A(Node& n_) : n(n_){ } } then the node n initialised will be a copy of the argument n_ o...
[1 reply] : 'n' will be a copy. It will not be a reference because 'n' was not de... (by Disch)
Bypassing writing object file? (GCC, g++)
 
Hi I'm learning how to use GNU Compiler Collection to compile C++ projects. Let's say I have a project with three source files: main.cc modulea.cc modulea...
[4 replies] Last: Is it created temporarily and deleted once a.out is written? KaBing... (by Moschops)
const array and variable
 
i can protect data from being changed in compile time like this. const int x=234; but if i have to protect the data in runtime what i should do....
[4 replies] Last: thanks (by time to c)
by lONLEY
problem
 
okay thanks ... that help me
[7 replies] Last: Yes, for once I hate this erasing practice. This is definitely bad et... (by webJose)
by lONLEY
help about converting to time
 
hello .. i am new student in CS and i hope u all help me with this problem .. i want to know how to make the user input the time as (hh:mm:ss) thank you....
[7 replies] Last: I believe you. Now you know that your teacher doesn't understand accel... (by Moschops)
What does 1 & mean
 
I know that the & before a variable is a reference to another variable. What does & mean in an if statement. Specifically this one: if (token == '(' & ...
[10 replies] Last: Thx. That helps a lot (by kidd106)
[Help] Function call and array
 
My main program is to convert a string of message to ASCII code, and then invoke a function call of binaryConvert() to convert the code to binary number. I'm no...
[12 replies] Last: @Noobprogrammer89 I'm at a loss on why it hangs. I re-pasted the abov... (by whitenite1)
traversing a linked list
 
I'm trying to loop through a linked list with my for loop but it wont terminate: any help? // linked list gba.cpp : Defines the entry point for the console...
[2 replies] Last: after the while loop adjustments, its still doesn't work, now the new ... (by Blessman11)
Run time error: function wont create my dynamic array
 
I need to create an array dynamically after reading obj coordinates from a file. The issue I'm having is that the dynamic array, needed to store my vertex grou...
[3 replies] Last: @Corpus thank you 1000 times, 2 weeks error solved (by Blessman11)
by Hi4ko
wifstream and failed output
 
Just a simple program here. #include <iostream> #include <fstream> #include <string> using namespace std; int main() { wifstream wifs("input.txt"); ...
[no replies]
bool v/s int flag
 
i have to develop a program where i have to check for a condition and assign a variable a value true or false so i am confused between these two approach. 1 bo...
[3 replies] Last: Using bool helps other programmers understand your code (or even you... (by Catfish)
by NaveeS
Area of a triangle-
 
Hey guys, im new to the forum/website/c++. Ive been asked to find the area of a triangle, by using the following for formula: Area=√s(s-a)(s-b)(s-c) Where: ...
[2 replies] Last: This helped me alot thanks navees. (by Bill Thompson)
Need help (ASAP)
 
hey again i have small problem i need help i want to print the "year with greatest and smallest increase and decrease" the years are from 2000 to 2009. i know h...
[4 replies] Last: hey it worked thanks mate appreciated. (by Pip3mAn)
no error: using comma or semicolon
 
Hi, I use Dev C++. I want to learn that, When I put a comma end of a statement. Compiler runs and there is no error. But books write you should use semicolon. W...
[4 replies] Last: thanks for your answers :) (by angelhoney)
by Jarr10
Program Help
 
What is wrong with this program code? I need help. using namespace std; int main () { string g; int count; cout << "Enter a num\n"; cin >> g; c...
[3 replies] Last: correct me if I'm wrong but "count" simbol belongs to std namespace so... (by codekiddy)
by Wolffe
Include sound into the executable
 
OK, so I have inserted a sound into my console program using PlaySound("pathhere.wav", NULL, SND_FILENAME | SND_ASYNC); I have included the appropriate headers...
[no replies]
November 2011 Pages: 1... 2021222324... 65
  Archived months: [oct2011] [dec2011]

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