Beginners - January 2010 (Page 18)

_kbhit() function
 
I got this code from goti. char getinput() { if (_kbhit()) { _getch(); // edit : if you want to check the arrow-keys you must call ge...
[1 reply] : have you tested? try a sample program if yours is not compiling as of... (by gcampton)
_ui64t0a warning
 
Is it okay to have a warning like this: warning C4996: '_ui64toa': This function or variable may be unsafe. Consider using _ui64toa_s instead. To disable dep...
[6 replies] Last: I see. Thanks a lot. (by olredixsis)
invoking rope/stl member function
 
On my linux SUSE11.0 workstation I am able to compile, link, and run the following c++ code invoking rope: http://www.sgi.com/tech/stl/Rope.html with ...
[1 reply] : Welcome to the forums, can you please use code tags for formatting whe... (by gcampton)
by yasser
wrong in c++ ??!
 
hello , I just found some thing wrong in c++ .. I want to know if there is any reason .. when I wrote this in a gedit(text editor) alone with main .. it work...
[4 replies] Last: And also, the indentation is erratic and poor. Be consistent in the si... (by tummychow)
Boolean (Bitwise Shift Operators)
 
Need a boolean function using bitwise shift operators to test if an integer is even or odd. int m = n >> 1 m = m << 1 if (n == m) then even else o...
[4 replies] Last: Duoas, you are probably right. But I try to elaborate on these things ... (by hajen)
constuction of prompts
 
I would like some one opinion and break down of constructing prompts
[3 replies] Last: there is a lot you would like to encompass that cant be explained in a... (by BettyBoopTS)
by Jaymie
Function Return Technique
 
Hi, imagine I have the following code inside a function: char* p = NULL; if (!SomeOtherFunction(p)) return false; delete p; return true; If 'SomeOth...
[2 replies] Last: Thanx, I think using auto_ptr is the best way to go; I'll need to mo... (by Jaymie)
by Vic
Pointer Array problem.
 
I have following code, void FillArr(int* pt ); void PrintArr(int* pt ); int main() { int* p ; FillArr(p); PrintArr(p); } void Prin...
[8 replies] Last: Thank you all for the help, I learned a lot from today. Best Regard... (by Vic)
by djmkr
quadratic equation
 
Hey everyone, im having a problem with a program which im trying to write to cover the quadratic equation formula..i was asked by my teacher to include only r...
[4 replies] Last: True. You could even simplify it to simply (a) if you like! (by hajen)
by valen
Relearning C++: Overloading operators, concepts, etc.
 
I apollogize for those who don't like long posts. If you are one who doesn't, then this post isn't for you. I'm going to include my full header, class source an...
[16 replies] Last: My program has several problems that I can easily see. Putting asi... (by valen)
circle collision
 
Hello everybody Right now i am coding on a circle collision programm. It detects the collision but somehow it wont move the second circle "Ball". Here is...
[7 replies] Last: "Ball" doesnt move at all. Line 141 moves it by xSpeedBall,ySpeed... (by Disch)
by nix
Code errors
 
getting the following errors in my code puzzle.cpp(77) : error C2059: syntax error : 'return' .\puzzle.cpp(77) : error C2238: unexpected token(s) preceding '...
[15 replies] Last: you may want to consider validating as well. http://www.cplusplus.com... (by gcampton)
BitBlt() BackBuffer on form s dc doesn't work.
 
At first I used my form 's normal HDC to draw on, but that caused flickering so I decided to make a buffer and found that bitblt what used for copying the buffe...
[2 replies] Last: Thank you very much, it is flicker free now. (by Pascal666)
Problems printing out using cout
 
Dear folks, I hope that you guys can help me out! I have this RingList template with a Person ( Persoon in my language, dutch ). When I want to print it o...
[no replies]
by hodge
A simple Cipher
 
As an exercise to better understand c++ I want to make a simple cipher. What I am trying to do is simple prompt the user to input two strings, convert the stri...
[2 replies] Last: #include <iostream> #include <string> #include <stdlib.h> #inclu... (by bolo809)
by djmkr
multiples of 7
 
Hey every1, i am trying to write a program which fills in an array of integers which r multiples of 7 between -63 and 1000; but it doesnt seem like its working ...
[9 replies] Last: @mcleano... Thanks, I modified my code to ckeck the value of 'i'. Th... (by bolo809)
Uses of dynamic memory allocation?
 
When exactly do you use dynamic memory instead of just instantiating an object of a class? The tutorial from here http://www.cplusplus.com/doc/tutorial/dynamic...
[2 replies] Last: Also, there may be times when you will want to create a new object ins... (by jrohde)
function pointer
 
Hi all, I was reading over the tutorials and I just had a question on function pointers. http://www.cplusplus.com/doc/tutorial/pointers/ On this page, a...
[12 replies] Last: omg I'm so confused.... :( (by gcampton)
by xyzt
Compiler generated default ctor rules
 
Hi, As known, when compiler generated default ctor is called, it initializes the data members(except int, float,etc.) I wonder if the compiler generates a c...
[2 replies] Last: For fixed-length array data members the default constructor of each el... (by jsmith)
Find the first nonrepeating character in a string? (1,2)
 
Given a string "teeter", the first non repeating character would be 'r'. in "toothless", it would be 'h'. I'm wondering about the most efficient way to get ...
[29 replies] Last: I see. Thanks Duoas. (by olredixsis)
January 2010 Pages: 1... 1617181920... 24
  Archived months: [dec2009] [feb2010]

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