Beginners - October 2012 (Page 23)

std::string storage
 
I want to ask where is an std::string stored? I am little confused about it. What I understand is that it is stored in the stack and it has a pointer to dynamic...
[8 replies] Last: Thank you very much. (by zanklob)
question concerning averages and finding the max and min.
 
Hello!! if anyone could help this would be great. I'm tring to figure out how to find the max and min number out of a set of user inputs numbers in a program. ...
[7 replies] Last: I'm understanding your example but then what is the value i need to se... (by ariana2608)
Array HW problem is buggy
 
"Use a one-dimensional array to solve the following problem. Read in 30 numbers, each of which is between 10 and 100, inclusive, As each m=number is read, valid...
[2 replies] Last: Thanks a lot, AA! I really appreciate the help. I fixed what I could b... (by Astrapto)
Seeking Advice
 
Ok Well I've Taught Myself C++ And I've Been Learning For About A Week Now, One Day I Hope To Get To The Stage Where I Could Begin Game Development But Anyways...
[10 replies] Last: DevC++? I had it for a bit and couldn't do a thing with it. I literal... (by Maxim Podolski)
whats going on here?
 
#include <iostream> #include <string> using namespace std; { const string FIRST_NAME = "Erika"; const string LAST_NAME = "Jepsen"; const int SCORE_1 = 2...
[3 replies] Last: I think that the best function is main.:) (by vlad from moscow)
Fastest Output
 
Would the output of a large amount of object members be made faster with the use of the std::ostream write() member function?
[no replies]
by veeyik
Array Problem.Can't find the result.
 
i am coding a program to let the user enter unspecified numbers of score until the user enter a negative number,the program will display the average of the scor...
[2 replies] Last: veeyik, I’m very new to programming but, I fidgeted w/your code f... (by Redd)
Replacing the lettter
 
I wrote a function for hangman its still in the works. But I have run into a problem with replacing my letters from my secret word (******) to (J*****). Or wha...
[6 replies] Last: I read it is just confusing so when you use string::size_type the :: i... (by jlillie89)
by Kuzco
Timing
 
Hi there! I'm reading about timing, and I'm wondering if I got this right. #include <Windows.h> int main() { int FPS = 60; LARGE_INTEGER freque...
[no replies]
SDL event check
 
Hi all, I am experimenting with SDL, and I made a very small game (it actually can't be called a game :) ). It simply checks for key input, and if the arrow ke...
[2 replies] Last: If you want to check if a key is down you can use SDL_GetKeyState that... (by Peter87)
outFile.write((char *) &ac, sizeof(account));
 
i wanna know the general function used in this line: " outFile.write((char *) &ac, sizeof(account)); " and what exactly does it do?
[1 reply] : You mean the write function? If outFile is a std::ofstream, then the f... (by Peter87)
delete dynamic memory in assignment operator on uninitialized array member
 
Hi: I'm using visual studio 2010 and doing a Win32 (native) C++ exercise. (Ivor Horton's 2010 p.793) The goal is to prevent all memory leaks. The suggest...
[6 replies] Last: Sorry about that - the error is in my typing not the book - the book... (by guestgulkan)
mystringreverse
 
void myreverse (char*p ) { int a,b=0,l1; l1= mylength(p); char temp ; for (a=l1-1;a>=0;a--) { temp =p ; b++; } for (a=0;a>l1;a++) { p =temp ; }...
[2 replies] Last: You need to declare l1 as an int. Also, consider using a variable nam... (by BrentSpinor)
by ldjm77
How could I print the input in the same line?
 
I'm trying to input the grade score next to the question but in the console, the input goes to the next line. #include "stdafx.h" #include <iostream> usin...
[4 replies] Last: @ldjm77 Show us what the program looks like now, and we can then give... (by whitenite1)
10
 
/*Hey.. This program is made for inserting a number of four digits then print the number in reverse order. ...
[1 reply] : The C++ modulus operator is % (by Moschops)
Getting a form to show from DOS prompt
 
How would i go about using the DOS prompt to load a windows form, from DOS.
[1 reply] : CreateWindowEx(...). It would be the same as creating a window from t... (by pogrady)
Need help on morse code program!
 
Hi, I have been assigned to make a program that decodes a message in morse code to english and that's what I have done... Except when I compile the program and...
[9 replies] Last: Yeah I figured it all out, guess I needed to sleep on it! Thanks guys ... (by Merriak)
please tell me: why does it loop forever?
 
I want to draw a row consits of 10 * symboys. but this source code lead to loop foever. and i don't know why? #include <cstdlib> #include <iostream> #include <...
[2 replies] Last: thanks so much. it's now ok.:D (by Denfypro)
by jgush3
Letting the user make a choice
 
I have written a program that converts a decimal number into binary, hexadecimal, and octal. The program needs to ask the user what they want to convert to and ...
[4 replies] Last: Aah yes, Moeljbcp, my mistake. (by georgep)
by veeyik
Where should i put my bool function?
 
Where should i include my bool isSolvable function so that it will be no error. #include <iostream> #include <iomanip> #include <cmath> using namespace s...
[6 replies] Last: On line 34 you are declaring a variable whose name is allready "reserv... (by codekiddy)
October 2012 Pages: 1... 2122232425... 84
  Archived months: [sep2012] [nov2012]

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