49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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: | |
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 … | |
| [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 … |
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 != … | |
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 … | |
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 … | |
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 … | |
on other programming languages, but none on c++, do you know any free ebooks out there on C++?? (no ebooks are not illegal) | |
Hi i want to convert my C project to C++. so does anyone knows any tool that converts a C program to C++ | |
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 … | |
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. | |
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 … | |
[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. … | |
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 … | |
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 | |
[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 … | |
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 … | |
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 … | |
Help required in files. SOME example to explain it please...........????????????? | |
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 … | |
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 … | |
hi, How socket programming is done in c++ for window? how to use port in c++? | |
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]; … | |
| 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 = … |
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 … | |
I want to find out how Visual C++(Windows Programming) is used to access and manipulate data in the database using ODBC. | |
Consider The Following Statements *p++=*(p++) These Two Are Equals.can Someone Explain Me How. Is Parentehsis Not Alter The Behaviour? :?: |
The End.