No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
- PC Specs
- Intel P4 2.4GHz, 512mb Ram, ATI Radeon 128mb
Below is my code for Fibonacci sequence, however when I use a large number such as 100 or more it takes forever to produce output. Why? any help would be appreciated. :( [code]#include <iostream> using namespace std; long fib_num ( long ); int main() { long num = 0; long … |
|
Hi everybody! I recently wrote a little simulation program, that simulates a real-time elevator system with 3 elevators. Since the code is around 530 lines I presume it is not a good idea to paste it here. There is some number of minor flaws of logical type and I would … |
|
Hello there, Okay well i have tried to do this program but i'm just not sure if i'm going in the right direction. Well i have to create a text file (Did that) which is inputed into the program, and the program has to count the instances of the following … |
|
Hi to all! I'm writing a simple simulation program for elevators but i get a problem, namely: [CODE] elevator.cpp: In constructor `Elevator::Elevator(int)': elevator.cpp:41: error: no matching function for call to `Button::Button()' elevator.cpp:10: note: candidates are: Button::Button(const Button&) elevator.cpp:16: note: Button::Button(int, bool) elevator.cpp:41: error: no matching function for call to `Button::Button()' … |
|
what about this question.........what is a default comstructor? how are an object's data members initialized if a class has only an implicitly defied default constructor? explain the purpose of data member. << moderator edit: split thread (was a reply to [thread=15829]this[/thread]) >> |
|
ok,i'm suppose to read all the "CP0X"(where x is a number) from a file and save it into a array.Then read the name(the YYYYY,ZZZZZ,etc) and save each them into array. Example: CP01 YYYYY CP02 ZZZZZ CP04 WWWW CP01 RRRRR CP03 UUUUU . . . CPO2 TTTTT So....i did this for(int … |
|
Why is VC++ 2005 beta2 telling me this and how do I solve it. .\Test2.cpp(42) : error C2664: 'FindFirstFileW' : cannot convert parameter 1 from 'char *' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast Please note that this problem does not exist … |
|
I am trying to build a scientific calculator. However, I have two major problems. 1. The decimal to separate the tens from the tenth 2. Modulus which outputs the remainder of the division of two numbers. Remainder = dividend – quotient * divisor; I can get the rest, but I … |
|
i tried to run this program but it comes up with the windows 6th grade algebra quiz has encuontered a problem and has to close message can anyone help? here is the code: [CODE]#include <fstream> #include <cstdlib> #include <iostream> #include <stdlib.h> #include <time.h> #include <string> #include <conio.h> using namespace std; … |
|
|
hello everoyne, I am nu 2 this so pleaz b kind. I need 2 make a program which does the factorial. But i not no how to do this. It is urgent so if you could help me i would be greatfull. God bless. i have this so far. [code]#include<iostream.h> … |
Hello, Im rather new to C, but I was struck with one curiosity as I delve into it. From what I understand, there is not supposed to be any support for string-datatypes in the language itself; you need to import libraries to get this support (where the strings are actually … |
|
hey every1, can any one tell me how to draw a ball or a circle in an console application vc++ and make it move around various coordinates.. basically the ball shud move arnd 4 directions. i tried printin chars but dont quite know how to go about paintin the ball … |
|
Suppose i have a main.cpp file and a test.h file: /////////////////////////////////////////// //main.cpp #include <iostream.h> #include <string.h> void test(); char foo[200]; int main() { strcpy(foo, "testing"); test(); return 0; } ////////////////////////////////////////////////////////////// //test.h void test() { cout << mir << endl; } WHY IS "mir" AN UNDECLARED IDENTIFIER |
|
hello ppl this is my 2nd post and as i said earlier, im writing a cpp program for an exam project. the project is designing a school database system neways the problem is that the the compiler hangs and terminates whenever a wrong type of data is entered i mean … |
|
hey guys, have a challenge for you guys, i am making a rpg game in c++ and need some help figurin out the creatures, and items the player will have, i know i won't get many replys to this so don't expect to get all of what i am looking … |
|
Hello, guys, and thank you in advance! I am trying to make the program stop running for six seconds. I don't know, however, how to use the system clock. The code I came up with is something like this: PROGRAM TIMER; VAR LINE:STRING; X, S:INTEGER; BEGIN REPEAT WRITE ('TYPE ANYTHING … |
|
[code]#include<stdlib.h> #include<stdio.h> #ifndef COMPARE_H #define COMPARE_H using namespace std; int compare(const void* pfirst,const void *psecond); #endif int compare(const void* pfirst,const void *psecond) { const int first=*((const int *) pfirst); const int second=*((const int *) psecond); return(first-second); } void main() { int iarr[10]={9,83,100,1,645,-7654,4,23,543,9}; int j=0; for(;j<10;j++) printf("element %d of iarr is:%d\n",j,iarr[j]); … |
|
my group has made two versions of the game pong for c++ the first version uses a two dimensional character array to represent the playing field and the second uses 966 individual characters to represent the 14x69 playing field both versions work fine, but the array style one's source code … |
|
ok well im making a mock atm machine (maybe i got the same book as that other guy?) but im getting an error code " E2294 structure required on left side of . or .* in function main() " this is puzzling me . can anyone help please? heres my … |
|
I am not sure if this is normal but I am having problems compiling libtiff.Can anybody point me in the right direction .I have followed the instructions from here [url]http://www.cs.wisc.edu/graphics/Courses/cs-638-1999/libtiff_tutorial.htm[/url] but still the compiler is not able to identify tiffio.h . Thanks |
|
a little boy's picture is displayed beside dave sinkula's id. is that dave sinkula? |
|
hello ppl since i am new to the group, il first introduce myself my name is Aziz Mansur. im a grade 12 student (CBSE in indian curriculum) studyin in Dubai, UAE. neways for my final exam i have to submit a project and mine is making a student database management … |
|
Hello: I need help with a project. I have to read an input file that contains data for 17 students. This is how they are: first ID, then first name, then last name, then 10 test scores. For this data, I have to read it and process it to send … |
|
There might be another Thread about this.... and if there is PLEASE tell me link. But I have been a few weeks trying to figure out why my games fail and the Visual C++ Library error comes and my game fails.... I have been uninstalling and installing but it hasnt … |
|
Was wondering what is the best book on assembly? There are many on amazon but some seem to get really bad reviews. Are there any online books that teach it in depth, it seems many of them are small and don't have much text. |
|
I have been taking a few courses in C++ and I am having difficulty starting a few problems. I am seeking help to develope programs for the follwing questions: 1) Write a function to calculate the mean, variance, and standard deviation for values stored in an array. 2) Write a … |
|
Hi every one.... i have problem in c++ , i hope i find the solution for it :-| :-| :-| . i want store number like 2.000000000002 12-13 digits after comma it's important to me these digits. i'm sorry if my english language is not good ,but this is all … |
|
hello guys, i would like to ask again about this: i am trying to divide two large-digit numbers (up to say 100 digits) using C. I thought of one approach but trying to code it, it seems so complicated... can anyone help me give an algorithm or a code to … |
|
Hi all, i'm coding something similar to a 'http-server', and i'm having problems with sending files to the client (web browser) from the server. instead of the client getting a Save File download box, it just recieves all the assembly code from the file, it gets printed as html text … |
|
Here I paste a simple address book/telephone book. The linker spits the following error: g++.exe derived2.o -o "Derived2.exe" -L"C:/Dev-Cpp/lib" derived2.o(.text$_ZN2ABD2Ev[AB::~AB()]+0x3a):derived2.cpp: undefined reference to `vtable for AB' derived2.o(.text$_ZN2ABC2ESsSsSs[AB::AB(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)]+0x3d):derived2.cpp: undefined reference to `vtable for AB' collect2: ld returned 1 exit status … |