49,761 Topics

Member Avatar for
Member Avatar for wesduncan

Is there a simple way to just be able to add milliseconds to my timestamp function? [code]char stamp[100]; time_t mytime; struct tm *mytm; mytime=time(NULL); mytm=localtime(&mytime); strftime(stamp,sizeof stamp,"%a, %d %b %Y %H:%M:%S %z",mytm); printf("%s\n" , stamp);[/code]

Member Avatar for wesduncan
0
745
Member Avatar for ganesh_IT

Hi guys I am a new IT guy.my task is to manipulate time and date.I use two separate classes for time and date. Now i need to integarate them, so which one is best Inheritance or containment

Member Avatar for Fbody
0
92
Member Avatar for Drakarus

Hey, I was wondering if any one could help me with several problems I am having. 1st problem: Can anyone tell me how to combine two int's and put a ':' in between. Bascially I want the user to enter the hour and minutes separately, then combine them both together …

Member Avatar for Drakarus
0
162
Member Avatar for abhijeet kamble

well i use bootime function to get and store time in my bios but i want to enter time in my system . what should i use for time and what to do for date well i am using time.h header files for that also i need to know about …

Member Avatar for mike_2000_17
0
117
Member Avatar for tamayoclarisa

HOW DO I COMPARA CHAR INTO A INTGER STRING? ----------------------------------------------------- #include<string.h> #include<conio.h> #include<iostream.h> #include<stdio.h> #include<ctype.h> #define g gotoxy //*design void design() { int ctr; for (ctr=0;ctr<9;ctr++) { textcolor(LIGHTBLUE); cprintf("--"); } } //------------------------------------------------- void maine() { clrscr(); g(8,3);design(); g(8,5);design(); g(27,4);cout<<"DATA STRUCT COMPANY INVENTORY SYSTEM"; int total=0,totalprice=0; int count,ctr=9; struct { char …

Member Avatar for Ancient Dragon
0
137
Member Avatar for thedoodler

Hello. I'm still fairly new with C++. I started on a code with a friend, but I'm still very unsure about setting up loops and such. Some help on where to go next with this problem would be much appreciated! This program requires you to input information about vehicles in …

Member Avatar for Kanoisa
0
1K
Member Avatar for 2008macedonkon3

Hey all, i have been reading some c++ books and they talk about a variable type called float but they also mention another one named double and another one named long double but what i don't understand is the difference, the furthest i get is that they tell me float …

Member Avatar for Kanoisa
1
1K
Member Avatar for Anyzen

i have a code that reads lowest and the highest number with inputs that are all Integer but, once i have an input (ex. apple 200)...it wont read anymore, need help in what to input code that ignores letters [CODE]//reads numbers only ex. 100 200 300 int main() { ifstream …

Member Avatar for Kanoisa
0
147
Member Avatar for abhijeet kamble

iamd using turbo c++ 4.5 and i need help in creating gui there i need some tutorials for that ..

Member Avatar for maruata88
0
62
Member Avatar for will9777

The problem is in dayOfWeek () I think. It may be overloaded or something. [code] #ifndef DATE_H #define DATE_H class Date { public: Date( int = 1, int = 1, int = 1900 ); // default constructor void print() const; // print date in month/day/year format int dayOfWeek (); // …

Member Avatar for Ketsuekiame
-3
173
Member Avatar for Neon87

Hello I want to create a web plugin to demonstrate some inverse kinematics algorithms on a basic 3D model on a web browser. I am using OpenGL API and my code is written in C++. I am really new to plugins and I have no clue where to start looking. …

0
33
Member Avatar for vs49688

I recently found an old game in which the soundtrack is read from an audio cd. I would like to redirect this via a proxy dll (winmm.dll) to read the soundtrack from certain mp3 files, possibly via FMODEx. So far I have been unsuccessful in every attempt. The game calls …

Member Avatar for Ketsuekiame
0
87
Member Avatar for c++learner

Hello, I've copied a multiarray into another multiarray and can't figure out how to convert an int of 1 into an asterik which is ascii 42 I believe. I need help to replace all 1's to an asterik. I've tried static cast which my instructor suggested but I must be …

Member Avatar for jonsca
0
186
Member Avatar for erozero

Hi, my assignment asked me to make a 3 row, 7 column array that asked the user to input amount of food for 3 monkeys. 7 represents the number of days. It should tell the user the average, highest and lowest amount for this.. Here is what I've got so …

Member Avatar for erozero
0
185
Member Avatar for therobot

I've got a program that has three different classes, all of which have their own pointer to an class called ObsFileName, who's main functionality is to store the name of an output file individual to the class, and return it with a function value(). All throughout the program, when a …

Member Avatar for therobot
0
138
Member Avatar for punchinello
0
49
Member Avatar for tehb

As I know that .c is the extension format for c coding while cpp is the extension for c++. But I noticed that there are some c++ project use .c extension instead of cpp, is it both extension is supported in c++ compiler?

Member Avatar for tehb
0
261
Member Avatar for shears

I am trying to create a C++ program that queries data from an ODBC data source. I am very comfortable with C++ and SQL, im just not sure how to set up an ODBC connection in C++. I have tried searching google and have not been very successful. Im using …

Member Avatar for Ancient Dragon
0
123
Member Avatar for hg_fs2002

I'm creating a linked list,adding the data I've read from file in each node but as I'm trying to print what I hold in nodes my output is some symbols.And even when I cout what I hold in my nodes in ADD function it's ok but as it goes to …

Member Avatar for mike_2000_17
0
98
Member Avatar for Saima_Khan
Member Avatar for heena sharma

how to reverse a string in character array without using string functions...

Member Avatar for Fbody
0
129
Member Avatar for 060609

#include <iostream> #include <cstring> using namespace std; int main() { int i,n,len; char x[3]; char status[15]; cout<<"This is an airplane passengers seats program"<<endl<<endl; for(n=1;n<=7;n++){ cout<<n<<" \tA\tB\tC\tD"<<endl<<endl; } cout<<"Please enter your seat accordingly : "; cin.getline(x,3); cout<<endl; len=strlen(x); // for (i=0;i<=len;i++) // x[i]=toupper(x[i]); for(int j=1;j<=7;j++){ cout<<j<<" \tA\tB\tC\tD"<<endl<<endl; } cout<<"Thank you for …

Member Avatar for sfuo
0
211
Member Avatar for lemonzipper

Hello All, I would like the user to be able to choose the file_name (assuming it already exists) and be able to append information to it. However, this condensed version, below, of what I'm trying to do gives me a compilation error. I feel like it has something to do …

Member Avatar for lemonzipper
0
255
Member Avatar for saransh60

#include<iostream> #include<string.h> int main() { char* str="my name"; /*plz explain what is pointer-name,and what is string- name here(realy confused) ? i am new to pointers :) */ int len=strlen(str); char* ptr; ptr=new char[len+1]; /*is this ptr pointer or string*/ strcpy(ptr,str); cout<<ptr; delete ptr; /*how this works */ cout<<endl<<ptr; /*this 'ptr' …

Member Avatar for Fbody
0
134
Member Avatar for bleedi

Hey! Again, small but devious problem for me: I have a string that gets time as an input, in a format like "9.45" or "15.37". How do I extract the hours and minutes to integer variables, when the hour part may consist of either one or two digits? If it …

Member Avatar for bleedi
0
137
Member Avatar for angelinrajeesha

Hi, Is it possible to allocate memory using malloc() (C) and release it using delete (C++) or even the opposite Alocate with new (C++) and release with free() (C) If not Why?

Member Avatar for mrnutty
0
124
Member Avatar for usa6631
Member Avatar for 060609

Write a program to assign passengers seats in an airplane. Assume a small airplane with seat numberings as follows: 1 A B C D 2 A B C D 3 A B C D 4 A B C D 5 A B C D 6 A B C D 7 …

Member Avatar for Duki
-3
206
Member Avatar for xcarbonx

Hi, im just a beginner in C++ and was wondering what exactly are pointers used for? Are they just to refer back to something or are they used differently than that? I was reading through the chapter on pointers in my programming book and it doesn't really clarify.

Member Avatar for mike_2000_17
0
98
Member Avatar for Decysen

Hi guys, i have this D3D code here: [code]void drawArrow(float x, float y, float yaw, D3DCOLOR color) { D3DXVECTOR2 points[3]; points[0] = D3DXVECTOR2(-3, 5); points[1] = D3DXVECTOR2( 0, 0); points[2] = D3DXVECTOR2( 3, 5); D3DXVECTOR2 points2[3]; float rad_dir = D3DXToRadian(-yaw); for (int i=0; i<3; i++) { points2[i].x = ((points[i].x * …

0
24

The End.