49,756 Topics
| |
if i want to check that wether the entered character is char type or int type,how can i do that? | |
Hi I want the format of the date like Fri, Dec 12, 2008 Earlier I used CTime today = CTime::GetCurrentTime(); CString chdpl = today.Format("%A, %B %d, %Y" ); for Friday, December 12,2008 But I don't know how to specify Fri in format Regards Karan | |
Hi How to get WeekdayName in VC++ I have searched on net and found the use of CTime::GetCurrentTime(); But this is the lengthy method Is there any shorter one. Kindly advice Regards Karan | |
I'm doing a program that shows which tickets have been sold for an auditorium. I am a beginner to c++ so I am not sure how I can do the following: a) Allocate an input with a character (e.g. when I enter 'A10' .. how do I allocate 'A' to … | |
I got a code. But it is not working compilation error is - undefined symbol try , throw , catch. I am using C++ compler version 3.0. Is this version not enough. Or any header file is to be included for exception handling. Please help me | |
Hi I am using the code to get the current date CTime aNow = CTime::GetCurrentTime(); char month[3]; char day[3]; char year[6]; char todaysdate[30]; itoa(aNow.GetMonth(), month, 10); itoa(aNow.GetYear(), year, 10); itoa(aNow.GetDay(), day, 10); strcat(todaysdate,month); I am getting value of month but apart from that I am also getting an unexpected character … | |
I am doing C++ assignment, it invols designing a program where the user can put binary numbers and gets a word in result. I have done the first part of the program but i am strugling to do the the last to tasks. Here is what i have done so … | |
Hi I am using Itoa function to convert int to string. CTime aNow = CTime::GetCurrentTime(); char* month; itoa(aNow.GetMonth(), month, 10); But I am getting error Unhandled exception at 0x00573deb in App_Name.exe: 0xC0000005: Access violation reading location 0x0000323d. Am I missing something Regards Karan | |
Hi, I want to know what exactly happens when constructor fails. Do we have mechanism which will provide us information regarding failure of constructor other than exception. What happens with the memory already allocated to the object when in some circumstances construction of object fails. | |
I was trying to create a simple struct array database that would be able to look up a user id and print out there first name, last name and age. So I've created a text file with 10 simple names ...here is my code ...can any one help me with … | |
Hi, everyone. I'm trying to use gettext in complicate application. It consists of C++ code wrapped in python interface via sip. Is it possible to bind textdomain once in python code, and don't use this function in C++ code? Now I have to use this function twice like is shown … | |
[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, cotheta, sitheta, distance, velocity, time, height; cout << " Input the angle of elevation : " << … | |
please tell me how i can code a BST in c++ ? i know that each node is like that of a linked list where one 'box' stores the item. another two boxes stores the address/pointers to the two siblings. but how can i transform this into code? like this? … | |
[QUOTE]I was given feed back from my instructor and I am not sure how to implement these changes. Here is the feedback: [LIST] In you MAIN module you call a WELCOME MESSAGE module but you don't have one defined in the code. [/LIST][LIST]Why do you have a variable named ItemName? … | |
so i think we might have nested loops in my upcoming final. so im practicing some challanges. heres a program sample For how many years have you collected rainfall data? 2 Enter the rainfall (in inches) for month 1 of year 1: 4 Enter the rainfall (in inches) for month … | |
Hello, I am trying to write the merge sort algorithm. My code is as follows: [code=c++] #include <iostream> #include <cstdlib> using namespace std; void m_sort(int list[], int temp[], int left, int right); void merge(int list[], int temp[], int left, int mid, int right); void mergeSort(int list[], int size) { int … | |
Hello, I have the following setup, where vertexArray is a pointer to float (float*). It is supposed to check if the pointer has been allocated memory for. If it hasn't, it should allocate memory, but if it's already been done it will go on to put values in the array. … | |
Hello , I am a noob in C++ coding and wondered if anybody here can please help me, I would really appreiate it I have to create a separate function within a program to check if the date entered by the user match the month he entered E.G= if he … | |
can we do sorting in chars in c++ like if acdb is input and abcd as output any one provide me prog for this ........... or Sample code: plz........... | |
Here is what I have right now. I created a loop that loops through 6 times. Each time it loops, it spits out a different answer at the end, then when it gets back to the top it starts at 0 and {0,0,0}. [QUOTE] ........ double U[6]={0,0,0,0,0,0}; double g[6][3]={{0,0,0}, {0,0,0}, … | |
I have problem in getting outputs plz give me suggetion or correct error if any and make it working....... plz help......... there is no error........in this program.........when i compiled. [code=c++] #include<iostream> #include<cstdio> #include<cstring> #include<cstdio> #define IS_STRING 1 #define IS_CHARACTER 2 #define IS_INTEGER 3 #define IS_FLOAT 4 //using std::cout; //using std::cin; … | |
[CODE] set<Student> myStud; Student b; myStud[b] = Student("Katie", 12);[/CODE] | |
I’m trying to learn how to use C++ templates, and I thought I was grasping it all ok until I decided to try to pass a template defined object variable as a function parameter. Having all kinds of troubles with that. I’m using a typical example of a parameterizd array … | |
Hi, I have a question for you, if you would be kind to answer it though i have asked it here. Hey, i had your email id. 1) To apply gravity on an object, do I need to make a rigid body out of the existing object in maya and … | |
[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. … |
The End.