Beginners - March 2012 (Page 59)

stack using array
 
Can someone please help me figure out why this outputs nothing when I run this program? The only thing on the screen is "press any key to continue" and once I p...
[4 replies] Last: Ok thanks. I think I can handle it from here. (by DocCeaser)
Invalid input statement
 
I am trying to figure out where I would put a 'Invalid input' statement. Would I put it in a 'default' statement? My code it this: #include <iostream> ...
[1 reply] : http://cplusplus.com/doc/tutorial/control/ (by closed account S6k9GNh0)
Need something to focus on
 
Hello CPlusPlus forum. I have used this forum for reference a long time now, however, this is the first time I have posted a topic. Actually I registered just r...
[10 replies] Last: Thank you very much ciphermagi, you saved me from days of complaining.... (by NorFredrik)
Recursion problems
 
Hey Everyone, So I am trying to write a code that uses recursion to print out the sequence: m(n) = 1/3 + 2/5 + 3/7 +...+n/(2n+1)... my code looks like...
[6 replies] Last: In simplest terms, recursive functions need a "base case". This is th... (by Ashishduh)
Help! reading in data from a file etc...
 
#include <iostream> #include <string> #include <fstream> #include <iomanip> using namespace std; int main () { string dataFile; string lastName, ...
[2 replies] Last: You are reading the entire string of numbers into an integer variable ... (by Ashishduh)
C++ Programming Hilfe gesucht für Systemzugriffe zu Prozesssteuerung und zur File-&Dir-IO
 
Hallo ich brauche Hilfe für einen freund / Hello I need help for a friend hier die Infos /Angabe / here the details / information Thema: Systemzugriffe ...
[3 replies] Last: //Rechte printf( (S_IRUSR & sb.st_mode) ? "lesen/" : "nix/");... (by Bogomil512)
Why should I prototype functions?
 
I understand defining the function, but wouldn't it be easier to code and more legible for the reader if one simply defined the function at the top of the progr...
[7 replies] Last: It matters to prototype because it lets the compiler know they're ther... (by wilyk3n)
I want to use my own program on other computer;
 
#include<iostream> using namespace std; void main() { cout<<"it's a number like this\"x+x+\(x/2\)+5+10=70\" so what is it: "; int x; cin>>x; for(int ...
[4 replies] Last: Instead of that for loop, it might be better to use a do/while loop. I... (by whitenite1)
array of strings...more confusion
 
Just trying to do something very basic (and slightly pointless) with an array of strings...just to help with the learning process. Why won't the following work?...
[6 replies] Last: You have arrays of five elements but in the loop you are trying to dea... (by vlad from moscow)
best c++ books for beginners?
 
I'm currently using "C++: A Beginner's Guide" 2nd Edition by Herbert Schildt. I'm well aware you should always learn from more than one source anyway and as I'm...
[3 replies] Last: "The Object-Oriented Thought Process" is a good book. It doesn't teach... (by strongdrink)
print it out according to its address
 
For example: int table , x=1; for (int i=0; i<3; i++) for (int j=0; j<5; j++) table = x++; for (int k=0; k<15; k++) // print out 1 to 14 c...
[3 replies] Last: How to print out the {char *name }? Like so: for (int l=0; l<(sizeof... (by coder777)
What is ^
 
I keep seeing things like string^ or char^. I think they are some kind of special pointer, but I never really needed them until now. Anyone know of a link to ms...
[4 replies] Last: I know, but they can compile together with a mixed or auto compile opt... (by snipslog)
by atjm88
i>=1??
 
#include <iostream> #include <conio> #define SIZE 4 int main() { float score ; int i; cout<<"Enter "<<SIZE <<" floats: \n"; for(i=1; i<=SIZE;...
[12 replies] Last: [quote=atjm88]Thanksn cire for ur explanation of "null terminator", ac... (by coder777)
Variables not retaining numerical assignments
 
I have written a program of sorts to calculate the element stiffness matrix of a 2-D rectangular finite element. For brevity's sake I will not post the entire ...
[2 replies] Last: Excellent. Thank you for the quick response. (by bwalence)
switch statement and for loop problem
 
hi! i'm trying to make a memory game but the part of the code that should tell the program where (ex:red and the another red is) is not working here i...
[2 replies] Last: thank you that was a pretty simple error that i made, but thank you on... (by Mrcerimo)
timer
 
Hi everyone.... I am trying to buid a timer in c++. Is anyone having any idea of how to do it.. PLease help me.
[1 reply] : http://rosettacode.org/wiki/Time_a_function#C.2B.2B (by Moschops)
Functions and Arrays
 
I am supposed to modify my current program to such that the user has the choice of entering either 5 males, 5 females, or quitting (the while loop should be ret...
[2 replies] Last: I didn't test this yet, Obviously. If you use his code I would su... (by cire)
Shorthand access.
 
Hello, I have a piece of code that basically just toys around with two arrays. Most of the operations are swapping and copying values. To reduce the amount o...
[6 replies] Last: Use a std::indirect_array<> along with std::valarray<> objects, pe... (by JLBorges)
by Tok3n
Find min&max in array of 10 random numbers
 
I can't seem to figure out or find the right resources in my book or online to find the min and max values of an array of ten random numbers. This is technicall...
[4 replies] Last: it is totally unclear why you initially set max_i and min_i to 0 ... (by vlad from moscow)
by atjm88
WinAPI??
 
#include <windows.h> int WinAPI WinMain(HISTANCE hInstace,HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) { MessageBox(NULL, TEXT("Hello World"), ...
[1 reply] : 1>c:\users\128a5s5\documents\visual studio 2010\projects\27\27\27.cpp... (by kbw)
March 2012 Pages: 1... 5758596061... 71
  Archived months: [feb2012] [apr2012]

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