Beginners - March 2013 (Page 70)

Cannot achieve correct output.
 
I am working on a project that requires me to write a program that calculates the e approximation (1 + x+ x^2/2! + x^3/3! +x^4/4! + ...). I have the program run...
[no replies]
Array subscripting to Pointers
 
I am suppose to write this program in two ways one with array subscripting which I have done below. The other way with pointers and pointer arithmetic. Not sure...
[1 reply] : p is the same as *(p + i) if p is a pointer or an array and i ... (by Peter87)
Need help looping
 
I am writing a program and it works but I am using the following: num1= rand() % 6 + 1; num2=rand() % 6 +1; but I have conditions that if num1& num2 are 1...
[2 replies] Last: Damn so that's what I was doing wrong... thanks Scorpic. (No I'm not m... (by closed account 3CXz8vqX)
Finding the min, max, average, median of an array set?
 
I'm doing a homework assignment for school, and our current assignment is to find the minimum number, max number, average of numbers and medians of numbers in a...
[2 replies] Last: Figures. I always over complicate this sort of thing. What about findi... (by sheahunter1)
invoke a function but the result confuses me
 
invoke one function called the_size(), and there is an if conditional and else conditional. however both of them are executed. why? /*invoke the_size() and ...
[2 replies] Last: After this statement cin>>c; , there is a newline character remaining... (by Chervil)
Help factoring a section of a program to a function
 
Hello all, I was wondering if I could get some input on a project I turned in for class. The instructor knocked 2 points off of the assignment of a possible...
[6 replies] Last: I was just looking for a quick and dirty way to answer my own question... (by IdivideBy0)
by miolde
i have to invert an array using recursive functions
 
#include<iostream> #define Max 9999 using namespace std; int inverte(int *tab , int tamanho, int i){ int aux; if(i<tamanho){ aux=*tab[taman...
[no replies]
Swap of pointers in structure
 
I'm stuck with this. I have already defined structure Item and AllItem is following structure: struct AllItem { int ID; Item *ItemPt; }; I'm tr...
[4 replies] Last: Tank you! I think I got it now... (by Jaimito)
new - delete
 
Ok, I've been looking around the internet for this and I'm still not sure. Say I have the this code: int main() { int integer = 5; int *blah = new i...
[2 replies] Last: Thanks for the info!! I hardly use new , but when I do, it's in a cla... (by Lynx876)
by boran
What's the problem ? I can't find
 
Guys Hello put command fails.What's the reason?Can be a libraries ? #include<stdio.h> #include<iostream.h> #include<fstream.h> #include<conio.h> void dosya_...
[2 replies] Last: Chervil, thanks for helping and suggestion.I got it. (by boran)
For beginners of C++
 
I was just looking through my C++ folder and came across my documents/assignments from when I were at university. I may help someone, so I've uploaded it to ...
[no replies]
by T4l0n
what should i change ?
 
#include <iostream> #include <string> using namespace std; string check(string y){ if(y=="true"){ cout << "access grant...
[7 replies] Last: I'd leave the true and false alone in check. It's more confusing if t... (by AbstractionAnon)
Moving from CString to string in C++ (1,2)
 
Ok, so I have to switch over from the CStrings we've been using to regular strings, and I decided to start with one of my older assingments to test this out, bu...
[34 replies] Last: When you said some things were a bit of overkill - did you mean the u... (by xanthian23)
Printing pointer addresses
 
This is what I have so far. I don't really know how to print the address of value1 though. Can someone show me how? #include <iostream> using namespace std;...
[2 replies] Last: Thanks go it! (by WolfPack2013)
How to take input directly without specifying how many of them?
 
I know the code for this kind of output(It is in the documentation) How many numbers would you like to type? 5 Enter number : 75 Enter number : 436 Enter...
[5 replies] Last: Got it. Thank you for inputs. (by schittia)
Chemistry Empirical formula answer
 
Hello, I am a high school student who has gotten interested in C++ language. For exercises I try to write programs for lessons that I learn in class (For ex. ...
[4 replies] Last: Yes good point. I'm trying something easier to begin with, going from... (by infinity42)
help with menus!
 
Im trying to write a program that will make a simple math quiz for students using random numbers. The program should display a menu that allows the user to choo...
[1 reply] : Please use the code tags when you post code. On the right of where you... (by Lynx876)
Scared to run this couple lines of coding
 
If I were to run this code: #include <iostream> #include <fstream> int main() { std::fstream file; file.open("Note.txt", std::ios::out); if(file.is_open(...
[7 replies] Last: Some people use it in a virus to make someone's computer slower and to... (by mausy131)
Do - While loop
 
My do-while loop isnt reading the entire bracketed area after 1 run (meaning the first run it actually reads the cin line). It only reads my cout line and skips...
[10 replies] Last: AbstractionAnon I will in the future, Thanks. (by ang1dust)
by blakeb
Variable Initialization?
 
Hi all, I am a beginner trying to become literate in C++ using the book written by the creator, Bjarne Stroustrup. I am trying to go through one of the exampl...
[4 replies] Last: O wow, I'm dumb. Thanks. (by blakeb)
March 2013 Pages: 1... 6869707172... 87
  Archived months: [feb2013] [apr2013]

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