C/C++ :: How To Take Input From Particular Position Using Graphics

Feb 26, 2013

I am new to grpahics progamming in/under Borland C. I have included the "graphics.h" header file but i am unable to take input on the screen. If I try to move my cursor to a specified position using gotoxy() function the pointer doesnt moves to the specified location and starts taking input at (1,1) coordinate.

View 1 Replies


ADVERTISEMENT

C++ :: Input A Name Horizontal And Display Output In Vertical Position

Feb 9, 2013

Program that input a name horizontal and display the name in vertical position using looping any kind of looping?

EX.
INPUT:Enter A name:John
OUTPUT:
J
O
H
N

View 3 Replies View Related

C++ :: How To Find Position Of First String In Input That Matches Regex

Oct 18, 2014

i want to find the position of the first string in input.txt that matches a regex

// Input.txt
[A-Z]o
Hello everyone, i am John It is rainy today

// Here is my code

string temp; // Store "Hello everyone, i am John
//It is rainy today"
temp.resize(500);
char REGEX[500];
FILE *fi;

[Code]....

View 5 Replies View Related

Visual C++ :: Reading Character Symbols On Lines Of Text Position By Position?

Mar 4, 2013

What I have to do is write a small program in C++ to parse the symbols that are used on 5 different lines of text in each position until position 30 is reached on each line. The goal of the parsing program is to interpret the symbols (characters), if there are any per each position, on the 5 lines of text in order to output the actual data that the group of symbols represents.

My question for is this: Is there anything special from a C++ environment that should go in to something like this outside of using standard stuff like the math associated with the search algorithm that has to happen here? The symbols are located in a file, so I know I have to include "iostream" and a few other headers. But outside of header inclusions and the code necessary to iterate and streamline the search and interpretation process, am I missing anything special that I couldn't otherwise find through simple google searches?

View 6 Replies View Related

C++ :: 3D Graphics With Quaternion Data

Jul 7, 2014

So I've got a sensor (contains a gyroscope, accelerometer, and magnetometer) that outputs quaternion data. I'm looking to take that data and use it to display the rotation of my sensor in the form of some object on the screen. I've seen instances where programs use a cube, but I'm hoping to figure out a way to have a little more control over what the object I'm rendering is.

how to get started? Are there any software packages that might be able to accomplish this?

View 1 Replies View Related

C++ ::  SFML - How To Put Graphics Into Program

Oct 18, 2013

I use visual studio 2012. When I asked what I should use in order to put graphics into my program, I was told by the community that SFML works well. My only problem is that now I have SFML, where and how do I unpack it?

View 6 Replies View Related

C++ :: How To Make A Cursor Without Using Graphics

Nov 27, 2014

I'm new to c++ So I have a project to make. I need to make a cursor like an arrow that will move when inputs are given. e.g if input is given 500 spaces UP it will move up and so on. it should rotate as well like 45 degrees and so on. how to make this arrow WITHOUT USING GRAPHICS.

View 2 Replies View Related

C++ :: How To Write Graphics Pipeline

Nov 25, 2014

I have been learning Direct3D for a while now (DX11), and I ran into a bit of a dead end. I have Frank Luna's book on D3D programming, but I feel like I could find a better tutorial out there. I am at the point of writing the vertex shader (the first one he goes over)

Currently, I am using .fx files to write the shaders. Is that right?

View 10 Replies View Related

C++ :: Use 3D Graphics Obj Files Created With UDK?

Jan 6, 2013

How do I use 3D graphics .obj files created with UDK in a C++ project?

View 1 Replies View Related

C :: Binary Search Program Using Graphics

Nov 22, 2013

Looking for the binary search program using c Graphics....

View 5 Replies View Related

C :: Produce Image Using GD Graphics Library?

Mar 20, 2013

I am trying to produce a image using GD graphics library. I can succesfully display my image, however I cant display this image along with a printf function too?

Code:
#include <stdio.h>
#include <gd.h>
int display_picture()
{
gdImagePtr gdImage = gdImageCreate( 50, 50 );
FILE *jpgFile = NULL;

[Code] ....

The picture displays but not hello.

View 5 Replies View Related

C++ :: 3D Graphics Programming Using SDL - Draw A Cube?

Apr 24, 2014

Ive been experimenting with 3d graphics by using SDL only and lines to draw 3d shapes (no OpenGL or extension libraries, just pure math),

Ive used this page mainly to guide me on perspective projection but i have no luck [URL] ....

Ive been trying to draw a cube, but instead it gives me a mirrored dual triangular pyramids

This code here rotates the object as seen from the equations in this link: [URL] ....

double aX, aY, aZ;
for ( i = 0; i < model->qLength; i++ ) {
for ( j = 0; j < 4; j++ ) {
aX = model->quadArr[i].pointArr[j].x;
aY = model->quadArr[i].pointArr[j].y;
aZ = model->quadArr[i].pointArr[j].z;

[Code] .....

generally, i project it onto a 2d plane using: [URL] .....

double dx, dy, dz, dX, dY, dZ;
int bx, by, bX, bY;
for ( i = 0; i < model->qLength; i++ ) {
for ( j = 0; j < 4; j++ ) {

[Code] .....

I understand that my code is very messy and unoptimized, but im just concentrating on getting the core concepts to work with my code

View 1 Replies View Related

C++ :: Create A GUI With Open Graphics Libraries

Aug 26, 2013

I'm trying to create a GUI with Open graphics Libraries.I have made a basic GUI that exits the program or shows the instructions if a option/Polygon is marked (A bigger one is behind them)But what I'm trying to do now is the following:

0. Start the direct access on the desktop
1. Screen: Press any key to continue
2. Select one option
2.1 Option one: Go to the circuit selection menu
2.1 Option two: View the instructions (Cleared)
2.1 Option three: Exit the game (Cleared)
3. Select a circuit
4. Go to the car selection menu
5. Select a car and start the race
6. Pause menu if Spacebar has been pressed

From the pause menu:

6.1. Go to the main menu
6.2. Restart the race
6.3. Exit

I know that it is OpenGL, but what i'm looking for is C++.How I could do that? What I have cleared is with IF but I'm looking for better alternatives.

View 1 Replies View Related

C++ :: Make Animations / Graphics For Game

May 27, 2014

Lets say that I try and make a BASIC game with c++, how do I make the animations/graphics for the game (i.e the characters ) Do I need a specific complier/ide (I am using visual studio)

View 11 Replies View Related

C++ :: VGA VRAM Manipulation For Graphics Modes?

Jan 20, 2013

I'm trying to find the errors in my emulation of VGA VRAM concerning graphics modes.

(I'm testing it by doing plotting of all colors from x=0 to x=xsize-1 (where the color is relative, so 0=0 and xsize-1=maxcolor (in the case of 16 colors it's 15, etc.)))

VRAM Graphics management:

#include "headers/types.h" //Basic type support!
#include "headers/hardware/ports.h" //Basic PORT compatibility!
#include "headers/hardware/vga.h" //VGA data!
#include "headers/mmu/mmu.h" //For CPU passtrough!
#include "headers/hardware/vga_screen/vga_displaygeneration_crtcontroller.h" //For virtual width in bytes within VRAM!

[Code] .....

View 1 Replies View Related

C++ :: Using Clear Device And Sleep Functions In Graphics

Dec 14, 2014

I have a college project which is a car racing game using C++ and the old-school graphics library BGI. After I draw the map and placed the objects(Car,obstacles,road's borders etc..)I added Sleep(); function to the function named Obstacles(); but the problem is, I can't move the car with the right&left arrows.a

Another problem,If I added a cleardevice(); command all objects disappears only the obstacles function keeps working. the Code is here:

char c;
do{
c = (char)getch();
if (c == KEY_LEFT) {
x = x - 10, x1 = x1 - 10;
} if (c == KEY_RIGHT) {
x = x + 10, x1 = x1 + 10;

[code].....

note: this is not the whole code, it's only a small portion of it, not a debugging question only need a hint how to fix it.

View 3 Replies View Related

C++ :: How To Make Colorful Text In Graphics Mode

Sep 14, 2013

I needed to know if there is any possible way to make a colorful text in graphics mode

Like each letter will have different colors using setcolor(random(20));

View 1 Replies View Related

C Sharp :: Saving Picturebox Image With Graphics In It

Aug 23, 2013

What i'm trying to do is load an image from my database create some graphics to it. probably just some lines and marks and save it back to my database. here's so far what I got.
 
for creating graphics:  
 } private void pictureBox3_MouseDown(object sender, MouseEventArgs e) {
            draw = true;
        } private void pictureBox3_MouseMove(object sender, MouseEventArgs e)  {
            if (draw)  {
                Graphics g = Graphics.FromImage(pictureBox3.Image);
 
[Code] ....

but the saving part doesnt work :( I think it only saves the image loaded to the picturebox but not the graphics created to it. how to merge it? i've tried to google it and found some sort of same cases but fails to make it work, something like converting it to bitmap.

View 2 Replies View Related

C/C++ :: Change Background Color After Pressing A Key (Graphics)

Aug 5, 2013

Here is my code:

#include <graphics.h> 
#include <stdio.h>
#include <conio.h>  
int main()  {
    int gdriver = DETECT, gmode, errorcode,i;
initgraph(&gdriver, &gmode, "c:cgi");
errorcode = graphresult();

[Code] ....

View 1 Replies View Related

C :: Functions To Work With Graphics Card - Read Pixel Map

Nov 25, 2014

In this project I need to develop few functions to work with graphics card. I work in minix and this is pretty rubbish.

I'm having an hard time to read a pixel map, or atleast to print it on my main function.

I have a read_xpm function, which is given, therefore, working.

Code:
char *read_xpm(char *map[], int *wd, int *ht)

Then I have a pixmap.h file which gives some examples of pixmap images that I can use as example:

Code:
static char *pic1[] = {
"32 13 4",
". 0",
"x 2",
"o 14",
"+ 4",

[Code] ....

The doubt is. I have a test_xpm function and I need to call this char array but this is so many pointers that I can't even figure out where I'm pointed to (?)

Code: int test_xpm(unsigned short xi, unsigned short yi, char *xpm[])

I tried something like read_xpm(xi, yi, *xpm[0]); but I'm guessing I need to index that array and run all those chars in order to show them.

View 11 Replies View Related

C++ :: VGA Resolution Limit With 1bpp Mono Graphics Modes?

Aug 25, 2014

What is the limit of a VGA with 256k VRAM, running 1bpp monochrome graphics? How high can the display resolution go?

View 3 Replies View Related

C++ :: Video Game Programming - How To Display Graphics And Set Properties

Jun 10, 2013

How would you create a video game in c++? I'm not sure really how to display the graphics and set properties and do all that stuff. I don't have money to buy a book about so how do you?

View 2 Replies View Related

C++ :: Graphics H Library - Error ID Returned 1 Exit Status

Mar 19, 2014

I am trying to compile a program with the graphics.h library included but I always get this error:Id returned 1 exit status.

View 1 Replies View Related

C++ :: Calculating The Inverse View Matrix From Computer Graphics

Feb 6, 2015

How do you calculate the inverse view matrix?

Is that really just the inverse of the view/camera matrix?

Or is that something else?

I have seen articles online on the overall mathematical theory behind it but I am using the GLM math library and it has this nifty glm::inverse() function.

I was just curious if I can do a glm::inverse(ViewMatrix) and that would be correct.

View 2 Replies View Related

C/C++ :: Racing Game With Graphics - Adding Color To Enemy Car

Oct 11, 2013

I am trying to make a racing game in c/c++ using graphics. My problem as of now is that i cant get color in the enemy car when i add color it flickers

How do i remove the flickering

Here is the game which i have made till now.

#include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
#include<process.h>
#include<stdlib.h>
void enemycar(int x, int y) {
setcolor(15);

[Code] ....

View 4 Replies View Related

C Sharp :: Open Image In Paint Mode After That How To Apply Graphics

Aug 21, 2012

How to open a image in paint mode after that how to apply graphics to that opened image in paint mode.I am attached a image i want to draw a center line in that image..

Attached Images point1.jpg (12.9 KB)

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved