Beginners - January 2011 (Page 40)

by hillm
Invalid allocation size: 4294967295 bytes.
 
Hi everyone, I'm new here as you might have noticed. I've tinkered with programming a few times in the past but always stopped for one reason or another before...
[3 replies] Last: You're giving new a value of -1, and it's interpreting it as 4294967... (by hillm)
when does the conversion take place??
 
i want to do a summation between an object and an integer class Base { int x; public: Base(int a) {x=a;} //operator int() {return x;} }; vo...
[4 replies] Last: ok i understand you are corect it doesnt exist an operator of + with... (by vagelis)
by sloper
validate char input
 
Hello, Just starting C++ and programming.Writing a game program as follows char letter; cin >> letter; I have a while loop that allows only e for ex...
[3 replies] Last: i tried it nothing i think that this "while (letter != 'e')//while loo... (by wojciech112007)
by mlazt
odd number problem
 
Im just gonna get straight to the point... Im supposed to make a program that takes the odd numbers from 1000 -> 2000 and then show me the sum of them all...
[1 reply] : #include <iostream> using namespace std; int main() { unsig... (by modoran)
inheritance question
 
i have this code class Top { public: void f (int i) {cout<<endl<<i;}; void f (double d) {cout<<endl<<d;}; }; class Left :public virtual Top { }; ...
[2 replies] Last: ok thank you my friend!! (by vagelis)
The mistake you'll probably make!
 
Beginners are excited about a new language but C++ has one little feature that has always annoyed me, after years of programming, I make the same mistake, time ...
[2 replies] Last: I also had this problem a few days back. I was working on something f... (by ProgrammingNoob)
Cursor control in a tic tac toe game.
 
I am working on a tic tac toe program with a basic AI which is not yet implemented. I am stuck with the cursor control, I can get the cursor to move but with di...
[1 reply] : My 2 cents: It looks like you are trying to use the cursor on a comma... (by ericeps)
by gilbo
Sorting 2d array keeping row data together
 
Unsure how to succinctly explain my problem, but here goes. I have a class problem where I must input data from a file that has the name of an element and it...
[5 replies] Last: Now I need to sort alphabetically too! *SIGH* I cannot find anything f... (by gilbo)
Calculates the extent of rectangles....
 
My problem is specific and brutally hard, so I'd love to, if anyone has any idea, help me: Each rectangle, may be partially or completely covered by another ...
[15 replies] Last: #include <iostream> #include<fstream> #include<sstream> #include... (by Mortifera)
by gilit2
unsigned char
 
When do we use unsigned char ? (and not simply "char"). (I know that unsigned char can be 0,..255 and char can be -128 , .. +127)
[5 replies] Last: Just thought I'd post a tip. Regardless of signedness, mixing signe... (by chronokitsune)
sort the vector which contain class
 
I having some problem in sorting. I need to sort things alphabetically. something similiar like these code... class A { protected: string name; ...
[5 replies] Last: - First bullet, you are passing variables by address so this declares ... (by Computergeek01)
find the size of string array
 
Hello assuming we have the next decleration: char *str_arr ={"hello", "foo", "bar"}; How can we programatically find the number of elements of that array? (w...
[3 replies] Last: What is with this site today, is everyone missing that part in the upp... (by Computergeek01)
by munir1
Fahrenheit to celsius
 
Hi, I have made a program "Fahrenheit to celsius" in Visual C++ 2008 express edition.When I debug it cntrol+F5 it is showing following error( i wrote in the ...
[1 reply] : There should not be a ; behind int main(). If that does not solve your... (by Kyon)
by Leppie
Another rand() problem
 
Still trying to create a roll playing game, and using rand to decide a coin flip issue (if 1 attack, if 2 don't attack) then rand again to decide defensive move...
[17 replies] Last: It seems like many people have problems setting up SFML. Personally I... (by Disch)
Problem with my program using functions
 
Hi,im building a Flight calculator program, which calaculates the fuel consumption needed for a plane. Im using functions and the program runs fine, but when I ...
[7 replies] Last: When it comes to a function just changing one variable you should retu... (by Computergeek01)
quick question.
 
What does the operator "->" do? Also if it's no trouble could I have a syntax example.
[3 replies] Last: Normally you access objects methods like this (saying that dog is my o... (by wolfgang)
Pointers
 
I'm having the hardest time with pointers. I understand what they DO and how to use them, what I'm having a hard time grasping is WHY you would use them. Can so...
[8 replies] Last: good question stereoMatching, in java you will not be able to see the... (by chathura666)
Functions
 
I am a beginner and i wanted to know what does it mean if the function has a (&) before it name i mean like : int &SetTime (...) ?
[4 replies] Last: alright got it ;) thanks guys i really appreciate it . (by billyb29)
column-wise display
 
I created a program to display the normal multiplication table. The last term and the table should be given by the user. The problem is that, if any bigger numb...
[4 replies] Last: Yeah it works..... Thanks. (by learner21)
by mlazt
Switch problem.
 
Hello I am kind of new to C++ and the programming stuff and I really want to learn it. So I went to the library and loaned some books and im halfway through the...
[3 replies] Last: Thank you guys very much. You dont know how useful this have been! :) ... (by mlazt)
January 2011 Pages: 1... 3839404142
  Archived months: [dec2010] [feb2011]

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