Beginners - September 2012 (Page 37)

random number
 
int main(void) { int i=0; for(i=0;i<10;i++) printf("%d\t",rand()%100); while(!kbhit()); return 0; } ...
[1 reply] : [quote=man]The srand() function sets its argument as the seed for a ne... (by ne555)
Get the member from svn_string_t structure
 
Hi all, am using vc 6.0 on windows. I need to print the data value of the svn_string_t structure. typedef struct svn_string_t { const char *data; /**...
[1 reply] : result is a pointer to a pointer so you have to dereference it one ext... (by Peter87)
Quick question about vectors in functions
 
Hello all, I'm currently trying to write a program that will be allow the user to muck around with net present value calculations. It's basically an exervis...
[5 replies] Last: You can only pass something to a function, but aside from that, yes. (by Athar)
exponent in a formula
 
Hello, I have been reading, and trying many different things, I need to insert a formula into a program, and generally thats pretty easy. I however have a e...
[1 reply] : In the math library #include <cmath> you can use the pow function. p... (by TheIdeasMan)
Function display problem
 
this is a Word Jumbling program and I can not get the hints to display . What am I doing wrong? Sorry about all the blank space. #include <iostream> ...
[1 reply] : Hi ! Code tags pls :D I think this is the issue: else if(guess == t... (by soranz)
Roots.cpp Program help.
 
Hey there C++ programmers, I need some help getting my code. I'm stuck on a homework assignment and need a little help clarifying what needs to be done. I'm run...
[10 replies] Last: Hi MrHatchi87, Floating point numbers (floats & doubles) are a bit of... (by TheIdeasMan)
For loop vs While loop
 
Hi, Which methodology is better and why, for loop or while loop. Thanks, Chuck James
[2 replies] Last: yup, its true.. it may also depend on what are you trying to do or whi... (by striker24)
Can't initialize class object in .h or .cpp?
 
Hello, everybody. I have been attempting to learn C++ recently, and I have hit a snag while learning about classes with headers. I simply wrote this program to ...
[2 replies] Last: Thank you for the reply soranz. This is exactly what I needed to know.... (by imsonull)
Removing duplicate words from Array of Structures
 
Working on a project where I am supposed to read in a file chosen by user and sort the words into a structure and the number of times they occur. My stucture...
[4 replies] Last: LowestOne is correct. Given this is a intro class to C++ I don't thin... (by ssrun)
really long output
 
I wrote this program for an assignment - didn't do too well - not gonna lie. However, would like to know where it went wrong. Just want to try to get it to wo...
[1 reply] : Hi ! Sorry it didn't go well...but happy that you're making an effort ... (by soranz)
What is wrong with this program??
 
This program doesn't want to run, I don't see what's wrong with it #include <iostream> #include <string> using namespace std; int main() { string sta...
[4 replies] Last: Please, mark this as solved so others won't click this thread. (by DesiredNote)
I don't even know where to start with this one.
 
Hello everybody... I'm soldiering through a C++ class and have been doing alright with the problems so far but this one kinda stumps me as my classes before ...
[16 replies] Last: !(i250>250) = !(FALSE) = TRUE And your loop will iterate over all the... (by codeFoil)
Reading Data Into Structures
 
I'm having difficulty reading data into a struct. Here is an example of the data: Journey 2: The Mysterious Island February 10, 2012 Josh Hutcherson D...
[2 replies] Last: No it's a file with data like the example I gave I read in with the co... (by cbowlan)
Variable Type Conversion
 
I am not that new, but do consider myself to be an amature due to my lack of knowledge of the winAPI, and Classes. But those things aside, I have a problem: V...
[4 replies] Last: @guestgulkan I know, and it doesn't matter. I know how to calc perce... (by IWishIKnew)
How Can i Change my Terminator in While Loop
 
I Want to Change my Terminator from 0 to = . . when i put '=' my program is error. . :( im so very beginner in c++ so pls help me guys please help me! ...
[8 replies] Last: Then I suggest you make c0p a char so that you can make a switch cas... (by Aceix)
by Serri
Problem understanding rand()
 
So i'm doing some of the beginner exercises that was posted on this website http://www.cplusplus.com/forum/articles/12974/ namely the "bracket searc...
[8 replies] Last: @Serri You don't need a ton of if's. Just the one's you already have.... (by whitenite1)
C++ help Please!! (1,2)
 
#include <iostream> #include <string> #include <sstream> #include <cmath> #include <iomanip> #include <fstream> #include <string> #include <cstdlib> ...
[20 replies] Last: Nevermind I see. I changed LO in 0<=x<=LO to 1. Thanks for all yalls h... (by amthompson4)
Blackjack
 
Hey guys. My lab for this week is to write a fairly complex blackjack program and i due by tomorrow night and I have no idea where to begin. I only have a succe...
[1 reply] : Perhaps the best way to start is to make it work for just 1 human play... (by soranz)
by clodi
How to deal with EVERY bad input?
 
Hello guys~ I am new in this forum, but I've been studying (by my self) C++ for 4 months. The question is: In the code below I am running a very simple progr...
[8 replies] Last: wow that actually explains a lot thanks, and so far I have had quite ... (by clodi)
by gerfy1
What programming should I do as a summer job?
 
I am 13 and wanting to get a summer job next year an was wondering which programming language should I learn to get a fair amount of customers. Thanks!
[4 replies] Last: Just stick with C++. If you already know the basics learn some web ba... (by cnoeval)
September 2012 Pages: 1... 3536373839... 62
  Archived months: [aug2012] [oct2012]

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