|
I will only give you a hint.
1> using % and / operators to get the individual digits.
2> Use switch case to determine what is the unit digit that you have and print string in it's place.
Looks like a homework
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
_AnsHUMAN_ wrote: Looks like a homework
Looks like this [^], also.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
I have made SDI application in VC++ 6.0 with Oracle 10g database through ODBC connection.
Before using this application, i would need to create tables,generate sequence,etc for the Oracle database. This activity is cumbersome for installation of the Software.
Hence I would like to create tables, sequence, triggers for Oracle database programmatically in VC++.
Could anyone guide me how to achieve above & what are the options avaialable to do this.
|
|
|
|
|
diptipanchal wrote: Hence I would like to create tables, sequence, triggers for Oracle database programmatically in VC++.
I suspect you'd need to use SQLExecute() .
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I am too conversant with VC++.
Could you tell me which options shall I choose while generating SDI MFC application?
Could you send code snippet or steps involved to create database & tables through VC++?
|
|
|
|
|
diptipanchal wrote:
Could you send code snippet or steps involved to create database & tables through VC++?
See here and here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Thanks for your reply.
I am not able to understand how to implement this lines of codes in VC++.
Could you provide some steps or example?
For exmaple, need to create table 'test'in Oracle XE database
create columns in database (viz. srno(int), name(VARCHAR)
create sequence for generating autoincrement for srno
create trigger
How do i acheive above in VC++. Can i use OLE DB option? Where do i specify server name, type of database driver, default user & password,
I hope you understand what i meant.
|
|
|
|
|
diptipanchal wrote: For exmaple, need to create table 'test'in Oracle XE database
create columns in database (viz. srno(int), name(VARCHAR)
See here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Thanks for your reply.
I am not too conversant with VC+. Could you provide some steps to create table for oracle database in VC++? Which project options to be selected in VC++ ?
|
|
|
|
|
diptipanchal wrote: Could you provide some steps to create table for oracle database in VC++?
See here and here.
diptipanchal wrote: Which project options to be selected in VC++ ?
You can do this with a console app or a GUI app.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Thanks !!
Many examples are shown with ODBC. I dont wish to create ODBC for creating tables in the database. In SDI with database option, it provides 3 options viz. ODBC, DAO, OLE DB. I think OLE DB option could be used as it does not ask for ODBC name.
Could you kindly tell how to create tables with this option?
|
|
|
|
|
Hi...
When i scroll mouse up, the window should be zoom. When i scroll mouse down, the zoomed window should come to normal. Like Autocad.
how can do it in vc6.0
Thanks....
G.Paulraj
|
|
|
|
|
|
Hi superman,
Sorry for difficalt. I am asking about how to write event for scrolling mouse?
G.Paulraj
|
|
|
|
|
|
I'm trying to make a game where the user is having to dodge these falling circles the entire time. I figured out how to make the ball fall the first time, but how do i make it fall over and over? I don't want to have to add a bunch of drawcircle functions just so it draws enough before the timer is over - i just want the ball to start back at the top once it falls below the ground.
I know it should be some kind of if statement of forloop or something, but that's as far as I've gotten :/
HELP!
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#define WIDTH 600
#define HEIGHT 600
float cx = 0.0;
float cy = 0.0;
int y = 0;
int ball = 0.0;
int min = -100;
int max = 100;
void drawCircles(int x, int y)
{
int i;
int segments = 100;
float radius = 40;
glBegin(GL_POLYGON);
for(i = 0; i < segments; i++)
{
float x = radius * cos(i*2.0*M_PI/segments);
float y = radius * sin(i*2.0*M_PI/segments);
glVertex2f(x,y);
}
glEnd();
}
void drawUser(int x, int y)
{
int i;
int segments = 4;
float radius = 40;
glBegin(GL_POLYGON);
for(i = 0; i < segments; i++)
{
float x = radius * cos(i*2.0*M_PI/segments);
float y = radius * sin(i*2.0*M_PI/segments);
glVertex2f(x,y);
}
glEnd();
}
void displayFunction(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1,0,0);
glPushMatrix();
glColor3f(1,0,0);
glTranslatef(10, 300 + ball,0);
drawCircles(10,0);
glPopMatrix();
glPushMatrix();
glTranslatef(cx,cy,0);
glScalef(.3,.3,0);
glRotatef(45,0,0,1);
glColor3f(1,0,0);
drawUser(0,0);
glPopMatrix();
glFlush();
glutSwapBuffers();
}
void timerfunction(int value)
{
ball -= 5;
if(y = 0) y = 300;
glutPostRedisplay();
glutTimerFunc(50,timerfunction,10);
}
void passiveMotionFunction(int x, int y)
{
cx = x - WIDTH/2;
cy = HEIGHT/2 - y;
glutPostRedisplay();
}
int main(int argc, char* argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGBA);
glutInitWindowSize(WIDTH, HEIGHT);
glutCreateWindow("SURVIVAL");
glutDisplayFunc(displayFunction);
glutTimerFunc(50,timerfunction,0);
glutPassiveMotionFunc(passiveMotionFunction);
gluOrtho2D(-WIDTH/2, WIDTH/2, -HEIGHT/2, HEIGHT/2);
glClearColor(1,1,1,0);
glutMainLoop();
return 0;
}
|
|
|
|
|
1) Use the 'code block' tag when you post code.
2) I suppose I'm the suspicious type, but I find it hard to believe that you wrote all that code, yet you can't implement 'some kind of if statement of forloop'.
I suspect that a much more likely explanation is that this is a homework problem, and you've been told to implement the functionality you've described.
|
|
|
|
|
no, i wrote it all
i'm just stuck at this one crazy simple part that i can't figure out worth anything
and yeah, its a homework assignment
|
|
|
|
|
please !!
|
|
|
|
|
Why don't you look it up by yourself ?
Anyway, you could have a look at tutorial 6 (texture mapping) on this website[^] (you will probably need to have a look at the previous tutorials first).
|
|
|
|
|
hi, i want to create network applications i know a few things about sockets in windows and all that stuff i've been trying to start from scratch looking for manuals on the web about winsocks but they don't give much details about it. is there a good manual you recomend me to program network apps. like voip which is my main goal, something from beginners to advanced programers i'd appreciate your help if u could advise me about a good one i could find on the web i use c++ for my apps. thank you
|
|
|
|
|
|
Application has main window that launches some modal dialog boxes (Muse, Mmove, Mcount, Merase, Mexit). All work except Mcount which generates stack overflow error.
The functionality and code for Muse and Mcount are virtually identical except for a transaction identifier (MU vs MC). Mmove is basically the same except one extra text box.
It seems to me that memory used for these dialog boxes would be allocated when launched and then freed when closed. Consequently, there should not be a problem with the Mcount dialog box.
Can someone point me in the right direction as to how to troubleshoot this stack error with the Mcount dialog box.
Thank you.
|
|
|
|
|
the easiest way for some function to get a stack overflow is for it to call itself (either directly or indirectly) ad infinitum. Check your code, and if you don't find it, show us your relevant code.
|
|
|
|