Beginners - March 2013 (Page 39)

by stdeez
help please!
 
for (int i=0; i<size; i++) { b =bug(initMaxX,initMaxY); //cout<<b .getX()<<","<<b .getY()<<">>"; temp.getX()==b .getX(...
[3 replies] Last: correct me if i'm wrong but shouldn't it be if(alive==true)? (by F1n4)
by Oria
public fields or properties?
 
Alright so I'm trying to creating something that is sort of like properties in C# for my classes in C++. for example. in C# i would do this: int MaxHP { ge...
[8 replies] Last: If your going to do that you might as well make the variable public. ... (by Oria)
linearize n-dimesionality
 
Hello forum, I have the following code snippet that represent the 2D array in the linear manner . int i, j; for (i = 0; i < dy; i++) //height ...
[1 reply] : #include <iostream> #include <iomanip> using namespace std; int... (by Chervil)
c++ programming, classes anf objects.
 
Hello everyone, i am getting a compilation error from the code below. It is when i am naming a variable with my user defined type. Can anyone hint me on how to ...
[4 replies] Last: Thank you very much Yanson. (by Raikueza)
Why is global variables bad?
 
Why does people say it is bad practice and should be avoided if possible? Is it security reasons? Harder to crack etc? Is it better to create a class and com...
[3 replies] Last: [quote=Minimacfox]" Why does people say it is bad practice and should ... (by closed account zb0S216C)
help me...
 
help me!!! my code.. ========================= #include <iostream> #include <cmath> #include <fstream> using namespace std; bool readFile(int &hp, int &d, ...
[7 replies] Last: Which compiler do you use? Sometimes the "real" problem is not exactly... (by DOSMaster)
by DELB
Terminology Question
 
int main(int argc, const char * argv ) { // insert code here... string lang = "C++"; int num = 1000000000; // One billion. // Try-catch bloc...
[1 reply] : A range exception is an exception thrown by the STL's containers. Th... (by closed account zb0S216C)
'too few arguments to function' error
 
Ok so I'm probably posting here too much, but I'm learning fast and you guys are really helpful. I get this error when I build the program, the program will ...
[7 replies] Last: @agnophilo I did but the answers were usually specific, like 'change ... (by dathtom)
Problems with for and while
 
I'm trying to creat a programm that draw two triangle like this: [Enter the width of the triangle :7 [******* ***** *...
[no replies]
writing a function that subtracts from an array
 
I have to write a function Subtracts val from each character in the array // If the array is: abcdefghi and value = 5, // then result is: 5...
[no replies]
Whenever I run any of my programs, I always receive "The system file cannot be specified"
 
I built a mod for Half-Life 2, and in de-bugging I recieved this: "The project is out of date. Would you like to build it?" To which I reply "yes", natura...
[2 replies] Last: You give no indication of what IDE/compiler you're using. If you c... (by AbstractionAnon)
by poziga
C - Get name from the string
 
Hello, I have a question on how could I easily get name that is written on the beggining of a line in a file in C programming language not C++ or C#. Lets sa...
[14 replies] Last: A simple fix for the compiler error is to use this, put 0.0 instead of... (by Chervil)
SFML Linking Error!!!
 
Alright, I keep getting this stupid linking error that is saying that it cannot find the sfml-graphics-d.lib file?!?!? I checked the are in which the file shoul...
[4 replies] Last: The file has been found, but this error comes up: 0x00000d. Can you... (by Disch)
by yhu420
operator+ problem
 
Hello everyone, It's been a lot of time since I started to try to find the problem in my code, and now, I'm wondering what's wrong with it, really... As you w...
[2 replies] Last: Ok thank you very much! I did this mistake already but I corrected it,... (by yhu420)
Help Compiling
 
Hello i need help compiling this program and headder file. Ive been trying to fix it for the past few hours and thinking i just need another fresh set of eyes t...
[4 replies] Last: no match for 'operator<<' exactly what it says: you didn't provid... (by MiiNiPaa)
Error in linked lists
 
Good evening. "cannot convert node to node** for argument 1 to void deleteNode" I encountered this error awhile ago, i get confused of this error. Can you guys ...
[2 replies] Last: What i did is that i changed the type of delete() to Node. Is that cor... (by kaaaylit)
expected ';' before 'endl'
 
Just tinkering around with some code, am very new to C++. For some reason this error keeps popping up, not just in this program but in other simple ones I've...
[4 replies] Last: you have to put the greater than symbols either side of an output Th... (by Chervil)
total commission
 
total_commission+=commission
[2 replies] Last: #include <iostream> #include <string> #include <iomanip> using nam... (by justin123)
Merge Sort doesn't work properly
 
I've tried to grasp the concept of merge sort, so decided to write an algorithm for it however in most cases, instead of returning sorted sequence of numbers, i...
[no replies]
Double Linked List
 
Hello ! I am going to Implement Double Linked list. i want to know that: class Node { int data; Node *next; Node *prev; }; class List { ...
[1 reply] : Pointer to an object of type Node object of type Node -... (by vlad from moscow)
March 2013 Pages: 1... 3738394041... 87
  Archived months: [feb2013] [apr2013]

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