49,756 Topics

Member Avatar for
Member Avatar for nida afaq

if i want to check that wether the entered character is char type or int type,how can i do that?

Member Avatar for Narue
0
108
Member Avatar for karang

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

0
103
Member Avatar for karang

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

Member Avatar for Freaky_Chris
0
188
Member Avatar for Dannielf

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 …

Member Avatar for mrinal.s2008
0
90
Member Avatar for lulusweety

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

Member Avatar for Freaky_Chris
0
162
Member Avatar for karang

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 …

Member Avatar for cikara21
0
143
Member Avatar for akmed

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 …

Member Avatar for AHUazhu
0
120
Member Avatar for karang

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

Member Avatar for karang
0
101
Member Avatar for rkumaram

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.

Member Avatar for rkumaram
0
168
Member Avatar for d1s_0n3_guy

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 …

Member Avatar for ArkM
0
116
Member Avatar for Trmsk

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 …

Member Avatar for Trmsk
0
146
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, cotheta, sitheta, distance, velocity, time, height; cout << " Input the angle of elevation : " << …

Member Avatar for vmanes
0
104
Member Avatar for nitro

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

Member Avatar for AHUazhu
1
139
Member Avatar for clb8372

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

Member Avatar for VernonDozier
0
271
Member Avatar for anbuninja

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 …

Member Avatar for deviantrunner
0
179
Member Avatar for ItecKid

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 …

Member Avatar for ItecKid
0
131
Member Avatar for brixton

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

Member Avatar for ArkM
0
73
Member Avatar for Titanius

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 …

Member Avatar for Titanius
0
167
Member Avatar for ninja_gs

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

Member Avatar for Freaky_Chris
0
106
Member Avatar for Yaserk88

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

Member Avatar for Yaserk88
0
92
Member Avatar for ninja_gs

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

Member Avatar for ninja_gs
0
118
Member Avatar for dandeliondream
Member Avatar for dandeliondream
0
95
Member Avatar for Frederick2

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 …

Member Avatar for Frederick2
0
3K
Member Avatar for knish

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 …

Member Avatar for Ancient Dragon
0
87
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
129
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
124
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
670
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

The End.