49,761 Topics

Member Avatar for
Member Avatar for Se7Olutionyg

[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 …

Member Avatar for shadwickman
0
130
Member Avatar for abhi.nalluri

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 …

Member Avatar for cikara21
0
211
Member Avatar for Se7Olutionyg

[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 …

Member Avatar for VernonDozier
0
125
Member Avatar for kevintse

[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] = …

Member Avatar for kevintse
0
135
Member Avatar for davids2004

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, …

Member Avatar for davids2004
0
671
Member Avatar for markmcwiggins

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. …

0
80
Member Avatar for eedythh2

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 …

Member Avatar for daviddoria
0
182
Member Avatar for konata_89

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 …

Member Avatar for daviddoria
0
93
Member Avatar for callprem26

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 …

Member Avatar for Narue
0
178
Member Avatar for micky692002

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 …

Member Avatar for Murtan
0
3K
Member Avatar for axfv

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 …

Member Avatar for AlbertPi
0
97
Member Avatar for NinjaLink

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 …

Member Avatar for NinjaLink
0
285
Member Avatar for jimbob90

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 …

Member Avatar for Freaky_Chris
0
75
Member Avatar for dr.eu

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 …

Member Avatar for dr.eu
0
93
Member Avatar for ninja_gs

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 …

Member Avatar for ninja_gs
0
134
Member Avatar for antonis233

hi im try to do a program to put binary number like this 1 0 0 0 and after display in this way 0001

Member Avatar for Freaky_Chris
0
46
Member Avatar for 30Caliber

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. …

Member Avatar for 30Caliber
1
2K
Member Avatar for ninja_gs

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]

Member Avatar for Ancient Dragon
0
161
Member Avatar for Undermine

[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 …

Member Avatar for mrboolf
0
109
Member Avatar for Manutebecker

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

Member Avatar for ddanbe
0
257
Member Avatar for shadowrun

i understand what this stuped question, but how deactivate "windows just in time debugger"?

Member Avatar for ddanbe
0
84
Member Avatar for serkan sendur

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 …

Member Avatar for Murtan
0
100
Member Avatar for bl@ck_d3ath-v2

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 …

Member Avatar for Salem
0
399
Member Avatar for shadwickman

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 …

Member Avatar for shadwickman
0
113
Member Avatar for jeevsmyd

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 …

Member Avatar for StuXYZ
0
117
Member Avatar for freelancelote

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 …

Member Avatar for Narue
0
146
Member Avatar for Passiongamer25

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 …

Member Avatar for ddanbe
0
638
Member Avatar for gunsmith2112

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 …

Member Avatar for mrboolf
0
139
Member Avatar for c++noobie

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 …

Member Avatar for c++noobie
0
182
Member Avatar for lmastex

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 …

Member Avatar for Freaky_Chris
0
104

The End.