49,761 Topics
| |
[CODE]#include <iostream> #include <cmath> using namespace std; const float G = 32.17; // function declaration float caltime ( float,float, float ); float calheight ( float,float,float); // main function int main() { float theta, float cotheta, float sitheta, float distance, float velocity, float time, float height; cout << " Input the … | |
I have developed a tabbed gui.I need to do some operations when the CLOSE button in the GUI is issued.I have removed OK and CANCEL buttons as I have no use with them. Can anyone please help me where can I include my code so that I can execute it … | |
[CODE]#include <iostream> #include <cmath> using namespace std; float scale (float,int) ; int main() { float num1; int num2 ; cout << "Enter a real number : " ; cin >> num1; cout << " Enter an integer: " ; cin >> num2; cout << " Result of call to function … | |
[code=c++] #include <iostream> using namespace std; #define OUT(x) cout << (x) << endl; template<class T, int size> class Stack{ T arr[size]; int top; public: Stack():top(-1){} void push(T obj); T pop(); }; template<class T, int size> void Stack<T,size>::push(T obj){ top++; if(top >= size){ top--; OUT("the stack is full"); }else{ arr[top] = … | |
Ok I have everything pretty much working except for one small detail. When I do inpatient I need to display the room charges as well as the medication and labs and services. It only displays the medication and labs and services charges but in the total includes the room charges, … | |
My pointy-headed management told me to drop development of a wxPython app that was working 90% and go back to C++ with wxWidgets. I have it working functionally, but integrating with the company's existing MFC code seemed easier to run this app as a separate process using sockets to communicate. … | |
I'm very new to C++ I have an assignment where I have to create a calculator. Should work in console window and should allow user to enter 1st then 2nd number and then operator user wishes... In addition I have to use a switch statement. Not only that but it … | |
i dont understand how to do makefile .? can u give me some exmaple how to makefile for this code.and where to add the make file ...im using devC++ and vb2008 [code=cplusplus] //file for GradeBook.h #include <string> using std::string; // GradeBook class definition class GradeBook { public: GradeBook( string name … | |
Hi all, 1. In C++, how can we print "Hello World" say 100 times witout using any loops (for, while/do while, for_each or recursion)? 2. I need to make a Base class underivavle. Could somebody tell me why "virtual" keyword is necessary in following code snippet? [code=cplusplus] #include <vector> #include … | |
Hi guys, I have to make a program for my programming class and I have no idea of how to do it. Can someone help me? Here's the program that I have to make in C++. A common memory matching game played by children is to start with a deck … | |
From Beej's Guide to Network Programming: [QUOTE]How can I set a custom timeout value for a TCP or UDP socket? It depends on your system. You might search the net for SO_RCVTIMEO and SO_SNDTIMEO (for use with setsockopt()) to see if your system supports such functionality. The Linux man page … | |
For Linked Lists, I know the code for insertBack and deleteFront....but [B]How do I change insertBack into insertFront and deleteFront into deleteBack with the code I currently have?[/B] Please help! [B]deleteFront code:[/B] [CODE=Cplusplus] void deleteFront(nodeType*& first) { nodeType *last,*current,*trailcurrent; bool found; int num; cout<<endl; cout<<"Inside deleteFront...removing item from front of … | |
im writing a program that adds up command line arguments, how can i account for a situation where there are no arguments at all? [code=c++] #include <iostream> using namespace std; int main(int argc,char *argv[]){ int answer = atoi(argv[1]); if (argc=='0'){ cout << '0'; } else if (argc == '1') cout … | |
Hi! I have to write program, that reads signs and it counts, how many is capital letters, how many small letters, and how many remaining signs. It stops, when reads thrue 20 signs or when sign q or Q is entered. Before the end it writes out typed and calculated … | |
Even a Working Code in Turbo C++ is not working in Dev++ .. I have Just installed ...... in C: and All Lib /Bin/Dir/Include Paths Are Correct as it was........But still Not working........... I have Tryed To rebuild it But No use any Help me out or Provide me a … | |
hi im try to do a program to put binary number like this 1 0 0 0 and after display in this way 0001 | |
Hi everyone, I'm new to this site and programming, and i was wondering if i could get some help with a programming problem of mine. I have to print 10000 random numbers ranging from 0 to 10000. The numbers should be put in the console screen and a txt. file. … | |
help me out i m New to Visual C++ Compiler whenever i comile any codes it shows this error wat it does mean ?????? [QUOTE]--------------------Configuration: greatestno - Win32 Debug-------------------- Compiling... Error spawning cl.exe greatestno.obj - 1 error(s), 0 warning(s) [/QUOTE] | |
[B]header[/B] [ICODE] class DeckOfCards { public: DeckOfCards(); void Shuffle(); void deal(); void hand(); private: int deck[4][13]; int numcard; int row; int col; }; [/ICODE] [B]main[/B] [ICODE] #include "dc.h" using namespace std; int main() { DeckOfCards DeckCards; DeckCards.Shuffle(); DeckCards.deal(); DeckCards.hand(); return 0; } [/ICODE] [ICODE]#include <iostream> using std::cout; using std::cin; using … | |
After reading up on them in terms of class hierarchy, they seem to just be almost like comments, to remind you that all classes use this sort of function | |
i understand what this stuped question, but how deactivate "windows just in time debugger"? | |
let say i have authors.a and books.a, authors.a is dependent to books.a and books.a is dependent to authors.a, can i compile them together? as a c# programmer it doesnt seem possible to me, for example you are adding a project called B as a reference to one of your project … | |
hi every body i am new user plz help me.plz send me the code of date converter or upload cpp file if user enter any date(date may be in past and may be in future) and ask us to tell the day at that date which user enter,by using date … | |
Hi, I was wondering what was wrong with the following code. It creates a [i]vector <int>[/i] and assigns it the values 0 - 51. Then it shuffles these values and prints it to the screen. When I compile it, I get no errors, but when it runs, it throws an … | |
Hii Everyone... I used to be an active member of this community... but because of studies i wasnt able to keep in touch with you guys.. Am an amateur programmer,and i need your help... I have written a programme to find nCr[n combination r] nCr=n!/(n-r)! I want the compiler to … | |
This's got probably an easy answer but it's been puzzling me a few hours already. The code below declares a string object and fills it character by character. I can print every single character (line 16) but I can't print the string as a whole (line 19). Could anybody tell … | |
I need some help with my program. The program is supposed to read ID#'s for students as well as grades from a file called "grades.txt" After the program reads the the file it displays a menu as follows: 1. Publish(publish contents of file to output file called "report.txt"); 2. Search(program … | |
can someone please give me a hand in adding arrays to my game here is what i have. [CODE]#include <iostream> #include <string> #include <time.h> #include <cstdlib> using namespace std; void initMessages() { const char* END_OF_ARRAY = "end_of_array"; const int YES_MSG = 0; const int NO_MSG = 1; } char* getMessage(const … | |
I'm trying to create an template of an array class that encapsulates an array of a given type with several methods that are useful but nonstandard to regular c++ arrays. I have created a link struct to contain elements of the array and pointers to both the next and previous … | |
Hey guys. Just a question. Is it possible to use a stack class and a link list class in the same program so for example if I decide to create a list (using the link list class) and then from this list take the odd numbers and put in a … |
The End.