Beginners - February 2013 (Page 66)

by Pegla
Can't compile and run code twice in code blocks..
 
So.. I've been programming for a while now.. in code blocks.. and when i wanna build and run a same or a different code.. sometimes it just pops out and error s...
[5 replies] Last: If you are working on a laptop or personal computer, make sure the pro... (by monkeybutt)
by cotro
a function definition is not allowed here before '{' token
 
I am getting the error title, of this method #include <cmath> #include "RayTracer.h" inline bool RayTracer::intersect (const Sphere &sphere, const Ray &...
[4 replies] Last: Do you have a semi-colon ; at the end of RayTracer.h? (by Lynx876)
Putting functions in .h file
 
Ok, so this is the situation. I'm trying to put all my functions in a .h file instead of having them all in the main.cpp file. My original program is much longe...
[6 replies] Last: it was actually the std::ifstream. Thank you very much. Also newbieg... (by younglink)
2d arrays- tic tac toe question
 
Hi everyone! I'll try to be as clear as possible! Basically I'm working on a tic tac toe program for my computer science class. We need to use 2d arrays to ru...
[6 replies] Last: You were absolutely right. I simplified my display and used something... (by nukacola)
by herold
Function templates
 
Facing problem in declaring template function.This is first ever program i have written for learning the concept of c++ templates. Following program is from tex...
[4 replies] Last: No, in that case you should exactly substitute 'class' with 'typename'... (by S G H)
Begginer practice problems
 
I am going through the beginner practice problems on this C++ thread. http://www.cplusplus.com/forum/articles/12974/ I am stuck on this particular part of...
[2 replies] Last: Awesome. That's it. Can't believe I overlooked that hah. Here's the c... (by PatricBernard)
Displaying Buttons
 
If some GDI object is painted ontop of the button, the button will be 'painted over' and would not visualize back untill you click on it. How could I refresh...
[3 replies] Last: It may be worth a look at your code. But in the meantine you can check... (by guestgulkan)
Help with getting input from file
 
I am trying to get the information from the file into a vector so it can then be sorted. However when reading in from the file I get the following for every li...
[2 replies] Last: When you check the value of "position" inside the while loop, you use ... (by toum)
2 dimension array
 
-Create a program that takes a matrix from the user of size (4 * 4); if there is repeated rows print (NO) else print (YES). by i just study array and if condit...
[1 reply] : Well, you need to break this down into stages. First define the array... (by Chervil)
by rcast
Simple first program - Logical Issues?
 
This is my first program attempt in C++. I'm having some logical issues in a program I wanted to made to test my knowledge on C++ so far after reading up throug...
[6 replies] Last: @iseeplusplus - This works! I failed to circle back to this reasoning ... (by rcast)
by vivre
Conditional Statement Question
 
why does the condition of if statement evaluate to true #include <iostream> using namespace std; int main() { if(3) cout << "It worked.\n"; } ...
[2 replies] Last: Thanks. :) (by vivre)
by mabel
can not find main form
 
Hi I downloaded a c++ program from the net. it came as a zip file. I extracted it and opened it with a visual studio but i don't know which is the main form. I...
[1 reply] : What do you mean "main form"? What is a "form"? There are no "forms" i... (by LB)
the problem about the circle class
 
#include "graphics.h" main() { int driver,mode,i; float j=1,k=1; driver=VGA;mode=VGAHI; initgraph(&driver,&mode,""); setbkcolor(YELLOW); for(i=0;i<=25;i...
[1 reply] : We don't understand the meaning of them either, because "graphics.h" i... (by LB)
by shipra
C programming Query
 
I am new and I would like to ask that what are the benefits of C training,What all topics should be covered in it? And has anyone studied from this course www....
[1 reply] : Different languages exist because they have different uses. No one lan... (by LB)
by tpinon
stuck on loop and logic HELP PLEASE
 
Writing a payroll program due next week. I'm stuck on a loop when the user enters the employee level (lines 49-57). But ALSO, I'm stuck on the logic when I...
[6 replies] Last: Ah, my mistake, I didn't see your break statements in there. Let me ha... (by MrHutch)
For loops
 
I have a huge beginners problem here. I am currently working on for loops. I understand the three parts contained within a for loop; variable=something;compar...
[9 replies] Last: All of you have been a huge help with this. I really appreciate every... (by beginner714)
Program not properly detecting newline characters
 
I have the following text file: 7 9 46123 85321 3872663 69826 2222222222222222222222222 7777777777766666666666666 9999999999999999999999999 99999...
[2 replies] Last: hmm... it seems to me that your numbers are too great for a "int" (on ... (by Nobun)
by mirec
NOT SURE WHAT TO DO NEXT
 
hi I am beginner and i really want to learn C++ well so I picked a book which seemed as the best book for me to start. It is "Teach yourself C++ in 21 days...
[7 replies] Last: Thank you Zereo I am trying to do my best every day.. and almost every... (by mirec)
back_inserter
 
Hello forum, I am getting error with the following STL function: back_inserter(...); This is how i am doing it : std::vector<Photon*> ...
[3 replies] Last: back_inserter expects an container aka a vector item, vector.begin() r... (by nedo)
by Mead
C++ triangle pattern
 
Hi, I would like some help with this problem. I have to create a program that will create this pattern: http://gyazo.com/124b7f7235749e8cdf0367eb29483000.png...
[1 reply] : * ************ ************ * ** ****... (by Chervil)
February 2013 Pages: 1... 64656667
  Archived months: [jan2013] [mar2013]

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