Beginners - February 2012

Call a Function From One Class Inside Another Class's Function
 
Suppose I have the following 2 class header files (A.h and B.h), with a function inside each: class A { public: double f(double); }; class B ...
[11 replies] Last: Thanks! (by skyline01)
Project help
 
Hey everyone, I am making a madlib program and would like a better direction or understanding on what I need to do. I need to read a file and find the to...
[2 replies] Last: Alright I will give that a try. But also adding the string to the map.... (by thecloud)
by moot1
functions in calculator
 
i dont get what im doing wrong...when i press 1 to add it goes right to the restart screen? #include <iostream> #include <cstdlib> using namespace std; ...
[2 replies] Last: As it was already pointed out you define function int add(); instea... (by vlad from moscow)
by Novak
Level Up Problem
 
Hi, I'm new to programming and have been following some tutorials on youtube. After doing the first few, I thought I'd put my knowledge to the test to see if I'...
[2 replies] Last: Thanks cire. Easily solved my problem without over complicating things... (by Novak)
by er0850
Some Assistance Please
 
Last week I had an assignment in my beginners C++ class, which was: "1. Write a C++ program to evaluate the following expression: (1/n!)-(x/(n-1)!) + (x2/(n-2)!...
[2 replies] Last: Okay sorry about that, I'm new to this website as well. In response t... (by er0850)
Quick question regarding IF ELSE
 
Hi, noob here with a quick question.... In the following code I'm trying to initialize int limit with a value using the if else statement. However when I try to...
[7 replies] Last: Oh ok, looks like its working now, thank you for the help! (by Hydrasin)
Difference between "Class X" and "Include <X.h>"
 
I see in many programs if I have to include a class X, I can do it either by declaring "Class X" or "#include <X.h>" in the beginning of my program. What is t...
[4 replies] Last: As they have all stated, you'd want to use the line class X; if your... (by Need4Sleep)
by moot1
how to exit loop
 
HI i want to exit this loop when if(comphealth <= 0 || yourhealth <= 0) that if statement is true.how do i do that.like can i put something after the if statem...
[12 replies] Last: You re define new varibles in every function. The varibles you have on... (by Need4Sleep)
by Lio
Default constructor
 
Why,after I initialize an object the print function is giving me error Thanks #include <iostream> using namespace std; class A { public: A() ...
[3 replies] Last: Thanks Spasiba:)))) (by Lio)
some help with overloading operators
 
Hi all, It's getting interesting now, but also more difficult. Please have a look at the following example for overloading operators in order to create a vector...
[4 replies] Last: So, all the effort is essentially to construct the part "+ param.x(y)"... (by HomesickAlien)
LodePNG Function
 
After many failed attempts of trying to make a function to load PNG textures like: GLuint Texture_1 = LoadTexture("Texture 1.png"); so that I could them...
[no replies]
Keeping a file open while passing to different functions
 
Hello, I've only been working with C++ for less than a week and I have a problem. I've written a question class for a trivia game that works fine when I enter d...
[3 replies] Last: I've actually worked it out on my own. I have not yet mastered referen... (by AbeVig0da)
Valgrind - Invalid read of size 1
 
I'm getting the next error when running memcheck with valgrind: Invalid read of size 1 ==2511== at 0x4C29852: __GI_strcpy (mc_replace_strmem.c:313) ==2511== b...
[no replies]
Question about pointers
 
Hi i got a function that looks like this: int main(void){ char * string; char * string2; string=test(1); printf(...
[4 replies] Last: I think it had something to do with a filepointer in my function. I ma... (by Castelmagno)
confuse in choosing a method --c++
 
I'm currently doing this program now for our project and i'm quite confuse on what to use in order to satisfy my idea.. here it is.. i have this program t...
[2 replies] Last: it would be more helpful if you elaborated on what you had to do with ... (by shocklightning)
PLEASE HELP
 
so i have a home work on structs and i made this code , i just cant figure out where i went wrong the cin isnt filling my array and its giving me a garbage v...
[2 replies] Last: THANK YOU!!! (by lulu girl)
Hash table for dictionary?
 
Hi everyone, I'm trying to create a method for spellchecking which isn't as slow as searching through every word in a dictionary. Apparently the best way of ...
[1 reply] : The hash doesn't have to be unique and the standard library already im... (by Athar)
Drawing An Arc Using Lines
 
I am new to C++ and attempting to put together my first Windows App. I am using Visual Studio 2008 C++ Edition with Windows 7. I have written a procedure whic...
[5 replies] Last: Just to finish this off, I had been calculating the circle point co-or... (by cppuser)
infinite loop ?
 
hello i have a code i can compile it. but once i run it it starts doing errors. i think it is because an infinite loop but i dont see where. here is code ...
[1 reply] : Give your variables more meaningful names than "a", that's currently t... (by Athar)
by moot1
question
 
For those of you whose job is writing in c++ what do you do.Do you write like programs for companys? Do you make games? do you use graphics? what do you use to ...
[3 replies] Last: I work for a consultancy/outsourcing company and write back-end server... (by MrHutch)
February 2012 Pages: 123... 64
  Archived months: [jan2012] [mar2012]

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