49,761 Topics

Member Avatar for
Member Avatar for Francisco

Hi buddies! I need help with this(don't worry 'bout the bad tittle!) Write a program that inputs the years in the range 1994 to 2004 and uses the for-loop repetition to produce a neatly printed out calendar. NB. Watch out for leap years. Hint: To calculate the start date use …

Member Avatar for frrossk
0
138
Member Avatar for big buc's fan

This might be a oversight by me but when I compile and the programs runs I get this error:park.cpp(11) : error C2065:'hours' : undeclared identifier [B]if (hours<=3)[/B] this is code from my program park.cpp(34) : error C2447: missing function header (old-style formal list?) What is this------->(old-style formal list?) Maybe I'm …

Member Avatar for frrossk
2
449
Member Avatar for Mannix16

Hey guys, Quick question about strings. Check out this piece of code: #define compare_them(x,y) ((x) > (y) ? (x) : (y)) main() { cout<<compare_them('A','B')<<'\n'; cout<<compare_them("X","Y")<<'\n'; return 0; } The output is B, X. Obviously B has a higher ASCII value than A so it is larger. However when it comes …

0
83
Member Avatar for raar

hi all, i'm an intermediate programmer in c++ and vc++ i know little in mfc . this year is my last year in collage and i must decide a graduation project. can anyone help me by suggesting any ideas for a project thx nd sorry for time :lol:

Member Avatar for FireNet
0
107
Member Avatar for A Monkeys Uncle

Ok, I'll be taking a C++ course soon, and I want to use a class (in college) that was very difficult for me to get an idea of what I'm looking at since browsing around C++ looks very complicated. In comparison to a college level calculus class how does it …

Member Avatar for Killer_Typo
1
2K
Member Avatar for kohkohkoh

[color=blue]I've just wrote this program and when i compile, there is an error at the red color fonts.[/color] [color=blue]Can i know what's the error?[/color] [color=#0000ff]thank you.[/color] char quest; char words[50]; int count; int z; ofstream file; file.open("WORDS.txt" , ios::app); file.close(); cin.ignore(50,'\n'); cout << "\n\n Please enter the word that need …

Member Avatar for gusano79
0
145
Member Avatar for shouvik

help. this programme shows linking error!!! :cry: :cry: :cry: #include "diction.h" int Dictionary::find_word(char *s) { char word[81]; for (int i = 0; i < nwords; ++i) if (stricmp(words.get_word(word),s) == 0) return i; return -1; } void Dictionary::add_def(char *word, char **def) { if (nwords < Maxwords) { words[nwords].put_word(word); while (*def != …

Member Avatar for Pietro
0
226
Member Avatar for XianBin

the book "Effective C++" have a item introduce cosnt,but a question i dont understand clearly. [code] class GamePlayer { private: static const int NUM_TURNS = 5; // constant eclaration int scores[NUM_TURNS]; // use of constant ... }; const int GamePlayer::NUM_TURNS; // mandatory definition; // goes in class impl.file [/code] why …

Member Avatar for FireNet
1
219
Member Avatar for iamboredguy

Since no one cared to answer my thread posted earlier, :mad: I'm posting the question again. I have this project to do and I want to use coloured text and some simple shapes, etc. But the problem is that my compiler does not support graphics.h or dos.h. Even my tclite …

Member Avatar for fishman
0
145
Member Avatar for xxraveteddyxx

were do i start? i just want to find a text template write code and then compile and learn c++ were do i go about starting on this compiler..i write basic code to start off but it wont let me pick "compile" and i want to know were the hell …

Member Avatar for Chainsaw
1
115
Member Avatar for Sphyenx

on other programming languages, but none on c++, do you know any free ebooks out there on C++?? (no ebooks are not illegal)

Member Avatar for Asif_NSU
0
174
Member Avatar for vivekgalatage

Hi i want to convert my C project to C++. so does anyone knows any tool that converts a C program to C++

Member Avatar for Chainsaw
1
193
Member Avatar for jwilcox

Could some one help me with writing this code in C++. I'm taking a course called PSP, personal software process. The program i have to write is : store and retrieve a series of n real numbers into and from a file. On entry, the program should accept integer or …

Member Avatar for jwilcox
1
187
Member Avatar for Sukhbir

1. int *f() { int *m=(int *)malloc(2); return m; } WHY THIS POINTER TO INT TREATED AS A GLOBAL VARIABLE. 2.can a pointer points to another pointer like that int *p,i=2; int *q; p=&i; q=p; IS IT RIGHT.

Member Avatar for let us c
1
148
Member Avatar for fyrphnx

I'm trying to write a program in complex arithmatic for my math class. The text I have gives me the following for addition: typedef struct FCOMPLEX {float r,i;} fcomplex; fcomplex Cadd(fcomplex a, fcomplex b) { fcomplex c; c.r=a.r+b.r; c.i=a.i+b.i; return c; } but my compiler refuses to accept it. it …

Member Avatar for fyrphnx
1
106
Member Avatar for Mr.PinkBunny

[COLOR=Magenta]Everytime I open up a project that I ever made, and try to build it, it keeps complieing all of these other files that i've never seen before, and it gives me about 300 errors. I don't know what to do. I can't even use it, everthing has these files. …

Member Avatar for Chainsaw
1
94
Member Avatar for Sandra John

Hello ! I am using Turbo C++ compiler and I am trying to implement Dictionary using arrays. All my menu options work perfectly but finally when I give exit option the program comes out of Turbo C++ and gives a window saying "The program tried to execute an invalid instruction …

Member Avatar for Chainsaw
0
85
Member Avatar for Sphyenx

im nto a programmer, and i wanna start im gonna pick the book up tommorow, i need a good book, i mean a good book that wil build the back bone to my future!/ lol. i mean a simple book for non programmers

Member Avatar for XianBin
0
109
Member Avatar for Mr.PinkBunny

[COLOR=Blue]I've been studying VC++ for about 2 months, and I was working on my first game from a book (Game Programming All In One) The game is 'Craps', it's a dice game. Anyways, I've had a few prolems with the codeing, can someone help me? (Windows 32 Console) Here is …

0
64
Member Avatar for Asif_NSU

In my program i will be taking two inputs, lets say two integers. If the number of input is more than two the program will exit. If it is two then the loop will be executed and after that it will again ask for two new inputs-- and will continue …

Member Avatar for Dave Sinkula
0
91
Member Avatar for shouvik

I need to submit 23 programmes in C++ in school by Monday. plz somebody provide me with only 3 programmes one on Inheritance, one on structures and one on classes... Very urgent plz. Plz post a programme that is probably of 12 to 13 lines or more... It would be …

Member Avatar for shouvik
0
125
Member Avatar for shouvik
Member Avatar for Stack Overflow
0
127
Member Avatar for Dick

I've scanned a lot of C++ sites but have not found an answer yet. In several pre written programs, I've noticed that a single brace "{" is used without being closed later in the program. It appears like it is used to go outside the program to get info. like …

Member Avatar for Dick
0
103
Member Avatar for big_k105

Ok my problem is i have a struct and im tring to ready a line into the array of structs using fstream. here is the code i have its just a basic layout of what will come later on. but here it is :) [code]// file: main.cpp // author: Kyle …

Member Avatar for big_k105
0
149
Member Avatar for mpkhadloya

hi, How socket programming is done in c++ for window? how to use port in c++?

Member Avatar for nallahp
0
153
Member Avatar for RITZY_G

just need a little help wit comparing two int arrays and return the value as bool. help: #include<iostream> #include<iomanip> using namespace std; using std::setw; bool compare(int[], int[]); int main(){ const int correctarraysize=5; const int pupilarraysize=5; int resultarraysize=5; int pupilarray[pupilarraysize ]; int correctarray[correctarraysize]={1,2,3,4,1}; bool resultarray=0; cout<<"\n\nEnter pupil's results:"<<endl; for(int k=0;k<pupilarraysize;k++) cin>>pupilarray[k]; …

Member Avatar for RITZY_G
0
211
Member Avatar for kohkohkoh

after words are been entered by the user, it saved in the file.txt as address something like 0047D123. what should i do if i want it to be appeared as in full character?? thank you! #include <iostream> #include <fstream> using namespace std; int main() { char words[50]; char *p = …

Member Avatar for kohkohkoh
0
78
Member Avatar for iamboredguy

I'm trying to use sequential binary file editing in C++. I use a temporary file. I have to make the changes in the file by storing the modified data in the temp file. Then I delete the original file and rename the temp as the original. The problem is the …

Member Avatar for iamboredguy
0
105
Member Avatar for samology

I want to find out how Visual C++(Windows Programming) is used to access and manipulate data in the database using ODBC.

Member Avatar for hivework
0
107
Member Avatar for Sukhbir

Consider The Following Statements *p++=*(p++) These Two Are Equals.can Someone Explain Me How. Is Parentehsis Not Alter The Behaviour? :?:

Member Avatar for Chainsaw
0
136

The End.