Beginners - July 2011 (Page 41)

C++ Book help!!!
 
Hello everyone. Im new at C++ ( I know what cin/cout/if commands/and only the while and do loop is) Soo you could call me super new. Oh and I made like a circle...
[9 replies] Last: Bit that came out in 04', and the second was 11'. Wouldn't the '11 be... (by Athar)
Calculating the nth Root of a number
 
I was trying to make a Calculator in the Console. Now I was thinking of adding the nth-Root of a Number. I decided to take the input in the form of a Double. ...
[6 replies] Last: Well, as for other methods: http://en.wikipedia.org/wiki/Methods_of_co... (by Athar)
Function returning what seems to be an adress
 
caller function: printf("%d",binaryadd(path)); function to be called: int binaryadd (char a ) { int m,n,zerocounter; for (m=0;m<=7;m++) ...
[3 replies] Last: Thanks hamsterman! I cant believe I never picked that up... Thanks aga... (by Sputnik)
I need your help!
 
Hi,I'm from China,and I'm 14 years old.I'm sorry I can't speak English well,and I am new at C++.Now I need your help.Would you mind helping me?Thank you very mu...
[1 reply] : Well at-least you use grammar in your post. Is there a problem with... (by Turbine)
Collision!
 
Elo! Using Allegro. Need help in collusion. This is what I got so far. int rad1,rad2; int dis = sqrt((long double)(px-px)*(px-bx)+(py-by)*(py-by)); di...
[1 reply] : collision happens if (dis <= 0). Maybe you should check that out and a... (by eraggo)
Checking if the User Input is of correct type
 
If I make a program that requires an User Input, say of type Int, but the user inputs a character, the whole programme begins to loop infinitely. Is there a wa...
[5 replies] Last: After you receive input, you can check the state of the stream with .g... (by Zhuge)
Using multiple files
 
Newbie alert: I'm learning about how to use multiple files to better organize code. Our book says that the class definitions go in a .h file while the class fu...
[3 replies] Last: Got it. Thanks! (by joatmon)
char case change
 
I am having difficulty trying to change case for letters. I want my program to be able to accept a and A. I have gotten it to work with string before, but I am ...
[2 replies] Last: in the end I just used some if statements....it worked out more easily... (by xXmusicmanXx)
Help w/ replacing characters in str w/ letter(char)?
 
Can someone please help me understand how to replace the character found with size_type variables in a string variable with a letter(char) inputted from the con...
[1 reply] : The only part of this that looks suspicious is the call to get_Secret_... (by jsmith)
Using STL containers in a header file
 
Is it possible to use STL containers in a class's header file? Meaning, can I declare and then construct say, a queue in a class I am writing? How would I make ...
[4 replies] Last: Doh! Amazing how little things like that can make you frustrated for h... (by rtzoeller)
by codrgi
Dealing with arrays
 
Im having trouble with dealing with arrays in c++, would someone please guide me on how to do something like below? i want to set a value into an array, but do...
[6 replies] Last: would ppl who actually read the post, start posting? appreciated :) (by codrgi)
Loops
 
Okay. This is a homework question. I have done the work to research. I'm just extremely thick headed I guess. Just can't get this thing to do what I want wh...
[3 replies] Last: So very kind of you. Massive sigh of relief. I think I understand no... (by rheeler)
Can't find/don't know my error
 
#include <iostream> #include <cmath> using namespace std; int main() { int feet; float meters; for (feet=1; feet<=100; feet ++) ...
[7 replies] Last: Ah ha ha I am so terrible at life. Wow, disregard (by Intrexa)
Remove String from Queue of Strings
 
I have been stuck on this for about a week and can't seem to find an answer. I need to remove a string that is typed in by a user (command prompt) from a queue...
[1 reply] : string Game::remove(string playerName) { string result; GameNode * ... (by ne555)
by vlad61
Recursion
 
hey guys! I am trying to tackle recursion - my teacher gave me a example problem showing the Fibonacci sequence done recursively and i was wondering if someone ...
[7 replies] Last: Hey thank you Shacktar - Im definitively starting to understand it but... (by vlad61)
Converting a string to an integer array
 
I am trying to convert a string of numbers to an integer array. Each number is a single digit so I should be able to just iterate over the characters and store ...
[6 replies] Last: Thanks a bunch! (by rtzoeller)
Doubt in Friendship between Classes
 
I have made a Class Board_t with a pointer board. I dynamically allocate memory for board. Board_t is a friend to another class Peg_t. A third Class Hero_t is d...
[4 replies] Last: Thanks a lot for explaining all that to me! I will keep all that in mi... (by Nisheeth)
making the code look nice
 
I am done with my code. All I need to do now is make it so when single digits in the countdown come up, there is a space in front of them. For example: 10 (spac...
[3 replies] Last: http://cplusplus.com/reference/iostream/manipulators/ here it is (by closed account iLUjLyTq)
Help initializing char**
 
So a lot of this code is kinda excess but it is more or less for me to know how it flows through my for commands... it is mostly notes, and var names are kinda ...
[1 reply] : Currently you are returning an array that is defined on the stack, whi... (by binarybob350)
by eidge
Binary File Input not reaching EOF
 
cop=1;//DEV while(database.good())//FIXME { database.read(buf, 21); if(database.eof()) //*1 break; ...
[6 replies] Last: readsome(buf,21) didn't work. But clear() did the trick. Thanks, Hu... (by eidge)
July 2011 Pages: 1... 3940414243... 54
  Archived months: [jun2011] [aug2011]

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