cout << 'I have a '<< '\q' << '\a' << 'images. Is there any possible way to embed//manipulate images to your screen using C++?
lol QBASIC.Code:screen 13 pset(500,500),3 draw "U500 H100 G100 D500 R100"
This is a discussion on Something \a images within the C++ Programming forums, part of the General Programming Boards category; cout << 'I have a '<< '\q' << '\a' << 'images. Is there any possible way to embed//manipulate images to ...
cout << 'I have a '<< '\q' << '\a' << 'images. Is there any possible way to embed//manipulate images to your screen using C++?
lol QBASIC.Code:screen 13 pset(500,500),3 draw "U500 H100 G100 D500 R100"
Child who knows C++Using Borland C/C++ Compiler 5.5 (Command Line Version)
judging from this, you've got ALOT to learn... but yes... you can't do much with standard C++, but you can use other extensions like OpenGL to create things like Warcraft III...Originally Posted by C++Child
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT
Lol, I did the code like that on purpose.Originally Posted by major_small
I could correct it like this:
I know everything but structures and linked lists. I might not know structures but I know classes.Code:#include<iostream> #include<fstream> #include<conio.h> int main() { char hello[256]; fstream x; x.open("example.txt", ios::out | ios::in) x << "I have a \\q \\a images. Is there any possible way to embed//manipulate images to your screen using C++?" x.getline(hello,256) cout<<hello; cout.flush() getch() exit (0); }
But my point is that is there any way to parse images into C++ like the following?
[code]
//*
#include<iostream>
#define getch() getch() //forget about stupid conio.h
#include<imgstream> //img means image && includes ifstream
int main()
{
imgifs zebra;
zebra.kb(500); //calls a function that sets how many kilobytes are to be read.
zebra.b(128); //128 for 128-bit true color
img * zebra4 = &zebra;
img cache; //Cache that xxx.open writes to
zebra.open("zebra.jpg", imgs::jpeg, ios::in; readto = cache)
display.cout << cache; //display, used to display images
display.cout.flush;
getch();
exit(0)
)
}
Last edited by C++Child; 07-23-2004 at 04:07 PM.
Child who knows C++Using Borland C/C++ Compiler 5.5 (Command Line Version)
what the heck are you asking about c++child?
Woop?
You cant really "directly" "embed' and manipulate images as it were. You need a graphics API.
But my point is that is there any way to parse images into C++ like the following?This is my idea.Code://* #include<iostream> #define getch() getch() //forget about stupid conio.h #include<imgstream> //img means image && includes ifstream int main() { imgifs zebra; zebra.kb(500); //calls a function that sets how many kilobytes are to be read. zebra.b(128); //128 for 128-bit true color img * zebra4 = &zebra; img cache; //Cache that xxx.open writes to zebra.open("zebra.jpg", imgs::jpeg, ios::in; readto = cache) display.cout << cache; //display, used to display images display.cout.flush; getch(); exit(0) ) }
Child who knows C++Using Borland C/C++ Compiler 5.5 (Command Line Version)
Well unless your code works, no. You need to use an API - Application Programming INterface. With languages like C++, people can write commonly use code (like the code to do graphics) and store it in a library, for you to use. An example is SDL (www.libsdl.org), but this is quite lowlevel and complex. I'd recommend something simpler while you're still learning. Try a google search or look for recommendations on the CBoard.
edit: Did you write this code, or do you understand it?
is there any way to do
[code]
#ifndef "All The Frickin Header Files That I Need.h"
#define ALL_OF_THEM_IN_THE_NAME_OF_G-D
#include "All The Frickin Header Files That I Need.h" //I wish the compiler understood this....
img newimage(); //prototype
img newimage()
{
iimgstream hi("C:\\...\\image.jpg");//hi is used for reading
img hi2;
hi.cin(hi2,500, 128); //variable to input data to, 500 kilobytes, 128 bit true color.
return hi2;
#endif
#ifndef <iostream>
#include<iostream>
}
int main()
{
cout<<newimage();
cout.flush()
#endif
return 0;
}
Child who knows C++Using Borland C/C++ Compiler 5.5 (Command Line Version)
no, you need a Graphics Library. I would suggest Allegro. It would go more like.
Then you would link your compiler to the library. Do some searching on Allegro.cc and see what you can findCode:#include <FrickenGraphicsHeader.h> void InitializeFrickenGraphicsLibrary() { // screen settings blah blah } int main() { //functions from graphics library to load and draw images return 0; }
And just out of pure curiosity... Did you read on a site or in a book or something that /q means question and /a means about? Im just curious as to why you thought this. Im not attacking, I'm just an EXTREMELY curious person.
Last edited by Vicious; 07-23-2004 at 10:38 PM.