Beginners - March 2011 (Page 6)

Needing to write to class and store 5 dates & Store in a Texfile
 
[#include <iostream> using namespace std; #define Length 2 // i know about this class date { public: int dd; int mm; int yy; }; // ...
[3 replies] Last: #include <iostream> using namespace std; #define Length 5 cl... (by jaimesharp)
by CJ13
Need help with dynamic string array
 
What I'm trying to do is fairly simple. I need to prompt the user for the number of words in a sentence, have them write a sentence, and then store it into an ...
[1 reply] : Nevermind, I figured it out. It was my array bounds on line 17. Must... (by CJ13)
unresolved external symbol
 
can anyone help im getting these errors: 1>hw16.obj : error LNK2001: unresolved external symbol "double __cdecl computeDistance(double)" (?computeDistance@@Y...
[1 reply] : solved it myself: the function prototype double computeDistance(do... (by ryandlich)
any problem with this code?
 
#include <iostream> add (int x, int y) int main () { using namespace std; cout << "The sum of 3 and 4 is: " << add(3, 4) << endl; return 0; ...
[2 replies] Last: ultifinitus has pointed out the error in your code. However, declaring... (by closed account zb0S216C)
Display's user input Date month and year
 
"Design a class called Date that has integer data members to store month, day, and year. The class should have a three-parameter default constructor that allow...
[1 reply] : Giving me some errors please help me 1. you did not #include <strin... (by matsom)
Node sorting
 
can anyone give me some hints i try to sort the data, but for example, i add 4 and 6. if i add 3 is fine, but i add any numbers bigger than 4 will be omit; ...
[3 replies] Last: --your code goes here-- tags. (by hanst99)
how to keep characters from breaking program
 
Hi as you can tell from this I am new to programming. This is an excerpt from a calculator I am trying to make. This is so that the program doesn't break whe...
[4 replies] Last: Thanks for the help everyone (by clusetr)
I am looking for information
 
I am looking for information on AnswersPay.com, are any of you using it ? This seems to be a site where you can get paid for answering questions and asking th...
[3 replies] Last: If you're going to try to advertise your site here it would've been se... (by quirkyusername)
Invoking a function?
 
I am having an issue invoking a leapYr function whereby I am to determine if the year entered is a leap year and what day number the date entered falls on. I a...
[6 replies] Last: Thank you everyone. I figured it out. (by holtdean)
by trig
open image
 
Hi, i have this: void __fastcall TERDmarker::openimage21Click(TObject *Sender) { TPicture * pct = new TPicture; Graphics::TBitmap *bmpPicture = new G...
[1 reply] : this should be in the windows programming section (by quirkyusername)
how to access [] operator in container class?
 
I'm writing a container class. Is there a way to access the operator in the class itself, without dereferencing the this pointer? ie: i'm finding i have...
[6 replies] Last: this-> is the same as (*this). (by Bazzy)
Passing a FILE pointer by reference
 
Hi! First the code: #include<stdio.h> #define file "1.txt" #define mode "w" FILE* openfile( FILE *file_pointer ){ file_pointer = fopen( file, mode ...
[3 replies] Last: #include<stdio.h> #define file "1.txt" #define mode "w" void o... (by hamsterman)
two dimensional char to char pointer array
 
passing the two dimensional array to the function which receives an array of pointers is being a problem. i can't figure it out. this is my code so far: #inc...
[11 replies] Last: oh snap, i got it to work. i found a thread at another forum asking an... (by asrockw7)
basic caculation
 
#include <iostream> int dn (int x, int y) { return x * 2 + y; } int main () { using namespace std; int x; int y; y = 10; ...
[2 replies] Last: thanks :) (by teddyeddy)
by secret
HOW TO WRITE THIS PROGRAM?
 
I'm given a homework that says: write a program that when input any three integers from the keyboard and print the sum , average , product , smallest and larg...
[9 replies] Last: A lot of beginners apparently do that out of fear they posted in the w... (by hanst99)
Question about std::tr1::bind and std::tr1::function
 
os : windows xp sp3(32bits) compilers : tdm gcc4.5(minGW) this one is okay std::tr1::array<size_t, 10> anchor; std::iota(anchor.begin(), anchor.end(), 0)...
[1 reply] : Besides, I find out in my compilers there exist std::bind; std::tr1::... (by stereoMatching)
Hi C++ quick question.
 
int x, y, *p = &x, *q = &y; x = 35 ; y = 46; *p = 78; cout << x << " " << y << endl; cout << *p << " " << *q << endl; the solution is 35 78 ...
[2 replies] Last: yes the output would be 78 46 78 46 i wonder why "y" is 78 , if so ... (by cacen)
Constructor Question
 
Hello, I'm having some trouble with a program I'm writing involving the construction of a class. The class includes a vector whose type is of another class. ...
[1 reply] : - Since you're using private members, you should also define your sett... (by matsom)
Good book for someone who knows some other programming language
 
Hello! I'm new to C++ and I'd like to learn it for good. Only problem is that I can't find a good book to explain me what I need to know. As I know php quite...
[1 reply] : 1. There is no such thing as 'the ultimate C++' book IMHO. But try rea... (by matsom)
by shenli
Singleton pattern
 
Hi, I have a question regarding the Singleton design pattern. In a code like this: class Singleton { static Singleton s; Singleton (int) {} Singl...
[2 replies] Last: Thanks a lot! (by shenli)
March 2011 Pages: 1... 45678... 52
  Archived months: [feb2011] [apr2011]

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