General C++ Programming - February 2010 (Page 4)

by ALB
how to output
 
anyone know how to output the student number,testes, average and grade using this and reading from an file ? { public: void input( ifstream& input,int stud...
[3 replies] Last: Can you give more details (by bluecoder)
Who can answer this question ?
 
Write a program that uses loop o perform the following steps: a.Prompt the user to input two integers: firstNum and secondNum (Use 3 for the firstNum and 15 fo...
[1 reply] : I think this will do #include <stdio.h> int _tmain(int argc, _TCH... (by bluecoder)
by Rycul
Code not starting ("Application Started") + VS poking around in weird folder
 
Hello people, I have tried to follow some articles about that will get you started into DirectX C++ (http://www.devmaster.net/articles/intro-to-c++-with-game...
[4 replies] Last: Thank you for replying, I wasn't sure where to post this so I figured ... (by Rycul)
new types may not be defined in a return type
 
struct state { int M_count; int C_count; bool boat; } int hn (struct state st){ struct state temp; temp = st; ...
[2 replies] Last: you are awesome! (by aashcool198)
by cppbeg
while(1) (1,2)
 
i understand that while (1) is an infinite loop . i have a function that check corrrct input . it's happend when i define a local array with possiblities the...
[24 replies] Last: Thanks all of you . (by bluecoder)
undefined reference to..passing a stl::queue to a function
 
Hello, I'm trying to pass a queue to a function. My queue uses a type I've created called "node" and is defined as: queue<node> bredthFringe; the fun...
[3 replies] Last: I guess in the examples I saw they just had a forward declaration and... (by Disch)
multiple source files
 
Alright, I've never used multiple source files in my projects, never had a need to. But I find my self wanting to now and I'm curious how to use a class I defin...
[2 replies] Last: thanks Disch, that fixed my problem edit: Yea the only reason I wa... (by Seraphimsan)
scope operator ::
 
void CAccess_Guard::ExecuteWindow() { if(::GetTopWindowID() == ....) //is the scope operator here ::GetTopWindow is equivalent to // CAcc...
[4 replies] Last: Thank you very much kbw for the help. :) (by olredixsis)
by chee
How do you input size into a Class Function?
 
class Class1{ private: int size; int x1 ; public: void sayit(int size); void sayit(int size); void doit(); void writeit(); }; // cs1 void Class1...
[11 replies] Last: Glad you see it. (by tummychow)
friend class error with gcc 4
 
Hello, I have a big problem porting a huge c++ application on MacOS X and gcc 4 here is my problem: I have a code look like that in a header: #if(defined(N...
[3 replies] Last: this code work with previous version of g++ and VS but with g++ 4 it m... (by maximephan)
by yoanne
Triangle recursive function
 
Can anybody help me solve this problem??Thank You. Write a complete C++ program which contains a recursive function to print a triangle filled with character...
[5 replies] Last: Did you try to run the programs I wrote above? One program uses head ... (by jsmith)
Stack
 
Hello. I am trying to create a stack program in c++. I created class as follows : #include <iostream> using namespace std; class MyStack{ ...
[1 reply] : You are trying to declare array of int's based on the size variable wh... (by kevinchkin)
std question
 
hello, is there difference between using namespace std; and std::cout .... ? thanks
[2 replies] Last: Here's a more in-depth answer: http://www.gotw.ca/gotw/053.htm (by PanGalactic)
Why this code does not work? :-(
 
Hi Guys, A friend of mine asked me about this and I am totally stumped by this simple code. Could some one please tell me why this is not working? ...
[3 replies] Last: strcat is what my friend was trying to do. I think the reason, as I me... (by kevinchkin)
Vector of objects from two subclasses of a common class
 
Hello all, I'd like to have a vector in which at runtime objects which are instances of two subclasses of a common class should be inserted, as follows: ...
[1 reply] : Solved!! My bad, should have been vector<A*> because I deined the obje... (by acgrama)
Difference b/w time() and localtime(), what happens inside time.h in library
 
what is the difference between time() and localtime(), bold parts in code: #include <time.h> //inside main function .. time_t rawtime; struct tm *...
[4 replies] Last: thanks. it was worth reading. (by vijaysaluru)
recursive fill function (1,2,3)
 
Hi I'm trying to write a program that gets as an input: * A perimeter (boundary) of a "closed" shape, such as an ellipse, circle, etc,. * Coordinates of an in...
[50 replies] Last: here is my program as of right now #include <stdio.h> #include "sim... (by coolProgramer5)
please solve this error...
 
Hi.. I am getting a error in the following code for AVL trees(HIGHLIGHTED CODE).. I tried in the internet for the error, but not able to resolve..CAn you hel...
[1 reply] : use class scope: (missing part in bold) AVL:: AVLNode * AVL :: I... (by vijaysaluru)
Functions and Arguments
 
hi everyone, i am having trouble figuring out how to modify this function in such a way that it will return a default prompt (such as "enter string:") if cal...
[3 replies] Last: Great! That is exactly what I was looking for. Thanks Duoas and darkes... (by newyorkcity)
Difficulty on finding what is causing this error
 
I am using g++ to compile this for school and I keep getting this message: error: expected primary-expression before â=â token I've looked around and stil...
[9 replies] Last: That was it. Thanks a lot for your help guys. Now it's time for some n... (by PatCioe)
February 2010 Pages: 123456... 21
  Archived months: [jan2010] [mar2010]

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