Beginners - September 2011 (Page 39)

extern on array
 
hello, I hope someone can explain to me why, when declaring global arrays, you cannot define the first dimension of the array in the header file. For exampl...
[no replies]
by cea11b
Stuck in an infinite loop
 
Hey guys/gals, I'm in my first semester of a C++ class and our first program we have to design is a program to tell the day of any date enter after the 1600'...
[19 replies] Last: So did you make it work or still need help? (by Bianca)
Executable Shows File Location
 
So I'm still pretty new to C++ and I'm still doing the majority of my work in the DOS window. I'm using Visual C++ 2010 Express, and I used release mode and cre...
[1 reply] : Surprised someone hasn't replied back with system(title "title") Somet... (by Da0omph)
adding rational numbers using classes
 
I'm trying to write a program that uses rational numbers (entered as a whole numerator and a whole denominator). Eventually I want it to add/subtract/multiply/d...
[3 replies] Last: Thank you for your responses. Blackavar -- I will be more careful in ... (by bool maybe)
Cant return two values
 
When I run the program qpl2 always equals zero but qpl1 shows up fine. I think it is skipping the if statements for c2grade altogether but I don't know why. i...
[16 replies] Last: thanks for all the help. (by DocCeaser)
by Kougan
Quick question about code
 
Hello, I am new to these forums and I have a quick question about code. Let's say I have this code and I have a bit of that code to be continually running ...
[6 replies] Last: Okay I see. Thank you, (by Kougan)
Changing the value of a member variable.
 
The instructions that I'm provided direct me to set the speed member variable as 0 within the constructor. If that is the case, how can I change that value from...
[3 replies] Last: Such a simple solution solved everything, thanks! (by CPPrangernoob55)
Getting user input from one function to another
 
Hi, pretty new to C++ and I have a question. #include "stdafx.h" #include <iostream> #include <string> using namespace std; int _tmain(int argc, _TCHA...
[9 replies] Last: Thank you so much! Everything works. Thanks for all your patience. (by iamtheodork)
by kinley
Function question
 
Hi, Following is the program to calculate the array length: void fun(int a ) { int size = sizeof(a)/sizeof(int); cout << "In function " << siz...
[6 replies] Last: Thanks for the reply shacktar !! Now my doubt is cleared. Thanks once... (by kinley)
Using vectors as a function parameter
 
I'm creating a program where I input a vector into a function in order to assign random values to all of the elements inside the vector. However I'm getting an ...
[1 reply] : The std::vector is a template class so you need to specify what it wil... (by Galik)
File Commands
 
Hi, I was wondering if there was a way to get a variable from a text file, input data to change it, and save it to be used later, all in C++. Thanks in advance...
[1 reply] : Yes there is. Don't forget to mark the thread as solved :) EDIT: Pl... (by shacktar)
find string in text file
 
I've just completed my first instructional c++ book and am still trying to figure out a few things. I'm making assignments for myself to better learn this lang...
[1 reply] : You need to open the file and read some or all of its contents into a ... (by Duthomhas)
The Question!
 
Hello All! This is what I want to accomplish: 1). Open a .txt file containing words in a list. 2). Add to the end of each word the number 1, repeat the p...
[no replies]
The Concept of fstream etc.
 
#include <fstream> #include <iostream> using namespace std; int main() { char buffer ; cout << "Please enter path to the file: " << endl; fst...
[8 replies] Last: Bump - any advice :) ? (by eXodus123)
Can't figure out What's wrong
 
Hello, I'm having a problem with this program. I have everything correct up to the for loop part where it won't display the numbers correctly. This is the probl...
[4 replies] Last: Thank you for the help. CosminNTG was correct because the output was j... (by illlojik)
fstream
 
If I were to give a project to someone with commands from the fstream library, how would the file open if it's destination is from my computer? i.e. ifstream ...
[2 replies] Last: Instead you can use a relative path (just "foo.txt") and that will lo... (by Da0omph)
by chipp
some_type& function()
 
what's the meaning ostream& in something like this: ostream& write (char* s, streamsize n); // if i'm not mistaken bout the func declarations... is it the sa...
[11 replies] Last: Right, setC returns a copied T , which in turn copies it's member v... (by Mathhead200)
Cant find the error
 
I just want the program to show me the quality points but when I compile it it says "[Linker Error] undefined reference to 'getGradeInfo(int&, char&, int&, char...
[5 replies] Last: That is called learning... Even professional programmers don't see the... (by eraggo)
simple mathmatic equation doesn't work
 
Yes I'm a beginner, I'm wondering why this will not give me the correct answer handleLength = (30*(stinkFactor/barPressure))+((stinkFactor/IDIOTS)*((3*tailL...
[10 replies] Last: Don't be sorry. Everyone gets ninja'd once in a while. ;D (by Disch)
Gamming Tutorials.
 
Is there anyone that can do a post on how to create an advanced 3d FPS made in C++? I have a really good idea for a game, yet i can't make it because i am on...
[6 replies] Last: I have a really good idea for a game, yet i can't make it because i a... (by cnoeval)
September 2011 Pages: 1... 3738394041... 48
  Archived months: [aug2011] [oct2011]

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