Hi pals, I am a Newbie in C++ Programming field. I plan to add graphics.h header class in Dev -C++ Version 4.9.9.2 from Bloodshed which is come along with Borland Compiler. I follow the Steps in URL : [url]http://www.uniqueness-template.com/devcpp/#step2[/url] But I Got Error in the Sample code which test the Working , Please Help me to get away from this problem . I am waiting to hear from you. Regards Anes P.A:'(

Member Avatar
Member Avatar
+1 forum 14

I am new to Dev C++ and i am creating a program of a game of snake. In Dev C++ the graphics open in WINDOWS BGI screen whereas the text gets shown in Text console(Dos). 1)i want to know how can i clear the WINDOWS BGI screen ? 2)how can i Close WINDOWS BGI screen so as to return to the text console? [CODE]#include<iostream> #include<graphics.h> #include<dos.h> #include<stdlib.h> #include<stdio.h> using namespace std; int snake(int); int main() { cout<<"WELCOME TO SNAKE WORLD\n PRESENTED BY PRABHJIT,RUHI AND SAURAV OF CS-11"; cout<<" RULES FOR THE GAME"; cout<<"KEYS---\n w- FORWARD\n a- LEFT TURN\n d- RIGHT …

Member Avatar
Member Avatar
+0 forum 5

Hi I got a quick question. Is there any way i can change the background color and the text color within my compiler of dev-c++. I'm not trying to change the color of the output when I run the program, I'm talking about the actual code itself and its compiler. I'm using Dev-C++ 4.9.9.2

Member Avatar
Member Avatar
+0 forum 5

Hi all, First time poster here, I've referenced posts here on daniweb in the past and it has always been helpful, thanks! But I can't find the answer to this particular problem here on the forums. I need to write a basic string parser as part of a coding assignment here at penn state. I have completed the assignment using getc, but bonus points are offered for a solution using getline. The getline() man page ([url]http://linux.die.net/man/3/getline[/url]) requires stdio.h and stdlib.h for getline to compile. [CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { //welcome to main! //we need our input …

Member Avatar
Member Avatar
+0 forum 8

I have been messing around with making a windows application in Dev-C++ I wanted to make it in a single source file, rather than a project to see if it worked. It did, other than the fact that I got the windows app, AND a DOS prompt behind it. Is there anyway to remove the DOS prompt? I will include the code, so that you can see what I mean. #include <windows.h> /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM); /* Make the class name into a global variable */ char szClassName[ ] = "WindowsApp"; int …

Member Avatar
Member Avatar
+1 forum 5

Dear All, I have written a code to implement an algorithm for base conversion from decimal to any base between 2 and 36 given in RG Dromey. Below is my code and I have a few questions relating to it: [CODE] #include<stdio.h> #include<stdlib.h> int main() { int newbase,zero=atoi(0),q,ndigit=0,r,ascii,i; char newrep[100]; printf("Enter number and base(between 0 and 36) to be converted"); scanf("%d%d",&q,&newbase); while(q!=0) { r=q%newbase; ndigit+=1; ascii=zero+r; if(ascii>atoi(9)) { ascii=ascii+7; } newrep[ndigit]=(char)ascii; q=q/newbase; } for(i=ndigit;i<=1;i++) { printf("%d",newrep[ndigit]); } system("pause"); return 0; } [/CODE] 1. Why is there a need for reverse conversion to characters of the ascii value after conversion before …

Member Avatar
Member Avatar
+0 forum 6

I want to make a c++ program that can open an image that is in any of the major formats (jpg, gif, bmp, png) and has any size and I want to resize it to a specific size (no, I don't care if it looks stretched) and save it to a different folder under the same file name. I'm not worried about maintaining the same file format (like, if it's easier to convert it to bmp before working with it, i'm okay with that). What I'm doing is revamping my website's photo gallery, and I want an easy thumbnail generator …

Member Avatar
Member Avatar
+0 forum 7

Hi pals, I try a code in my Dev -C++ Environment v 4.9.9.2 in Windows XP. I save file as "satwant_mysql.cpp" in E:/C++/ Directory.... [CODE] #include <mysql/mysql.h> #include <stdio.h> int main(){ MYSQL mysql; MYSQL_ROW row; MYSQL_RES *result; unsigned int num_fields; unsigned int i; mysql_init(&mysql); if (!mysql_real_connect(&mysql,"localhost","root","","MyDatabase",0,NULL,0)) { fprintf(stderr, "Failed to connect to database: Error: %s\n", mysql_error(&mysql)); } else { if(mysql_query(&mysql, "SELECT * FROM my_table")); //here goes the error message <!-- s:o --><img src=\"{SMILIES_PATH}/icon_surprised.gif\" alt=\":o\" title=\"Surprised\"><!-- s:o -->) else { result = mysql_store_result(&mysql); num_fields = mysql_num_fields(result); while ((row = mysql_fetch_row(result))) { unsigned long *lengths; lengths = mysql_fetch_lengths(result); for(i = 0; i …

Member Avatar
Member Avatar
+0 forum 1

Talk about C++ & Allegro here, any problems and ideas are welcome!

Member Avatar
Member Avatar
+0 forum 2

Im creating a program in Dev C++ and the program has a switch statement in it to take the user to a differ 'page'. For example the user presses 1 and it takes them to a page that deals with orders etc. E.g. [CODE]switch(mainmenu) { case '1': Menu1(); break; }[/CODE] Then when Menu1 is displayed it clears the screen with system("CLS"). How can, once the user has finished using that page, return back to the main menu?

Member Avatar
Member Avatar
+0 forum 7

I have a dialog-based application that just has a big edit box. I want to make a quotation mark bold right when it is typed. How can this be done? I am using dev-c++ 4.9.9.2 (I don't know how to make single characters bold, let alone how to capture the key pressed)

Member Avatar
Member Avatar
+0 forum 5

I'm using Dev-c++ to make a dialog-based app. I had it working, but now I am getting an error: An Access Violation (Segmentation Fault) raised in your program. I have narrowed it down to the winmain function: [CODE]int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLine, int iCmdShow) { if (iCmdShow > 4) { commandlineopener=szCmdLine; } gCmdShow=iCmdShow; strcat(about,version); strcat(about,"Stuff"); //About stuffs go here DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG1), 0,(DLGPROC)MainDlgProc); WSACleanup(); return 0; }[/CODE] What am I doing wrong?

Member Avatar
Member Avatar
+0 forum 4

First I'd like to say how much I appreciate these forums. They have helped me before, but this is the first time I've posted a question myself. My problem is that I use a different IDE than my teacher does (probably not the best idea) so I want the program to compile and run properly in his IDE when he tests it. I use CodeBlocks (although I want to use NetBeans but it's too difficult to set up) and he uses Dev-C++. So I finished my project in CodeBlocks yesterday and it was working fine. I opened it up in …

Member Avatar
Member Avatar
+0 forum 6

I have just started writing C code in dev-c++. The programs are running fine, but each C program shows me the following warning: [QUOTE] [Warning] command line option "-fno-access-control" is valid for C++/ObjC++ but not for C[/QUOTE] The test program I used was: [CODE] #include<stdio.h> int main(){ system("pause"); return 0; }[/CODE] After searching a lot all I could find was: [QUOTE]-fno-access-control Do not obey access control semantics[/QUOTE] Can anyone please explain, what is this all about? Thanks..

Member Avatar
Member Avatar
+0 forum 3

Hi again, I'm back, with another question about my calculator program (which I got to work, yay!) Why does the following program not work (when the one after it does): [CODE] #include <iostream> using namespace std; float x; float y; char z; int add() { cout << x << " " << z << " " << y << " = " << x + y << endl; } int subtract() { cout << x << " " << z << " " << y << " = " << x - y << endl; } int divide() { cout …

Member Avatar
Member Avatar
+0 forum 5

Well, first of all i already know some things about c++ programming, but i'm really aiming to video game programming. Until today, i used to compile my codes on WxDevC++, but isn't really that good, and people keeps telling me that Microsoft visual studio is good for game developing. But also I've heard that MVS is really crap so i'd like to know your opinion. Thanks

Member Avatar
Member Avatar
+0 forum 1

[Linker error] undefined reference to `__cpu_features_init' comes to [CODE]#include <stdio.h> int main(){ char c; printf("Hello World!"); scanf("%c", &c); } [/CODE] I don't think that it's code problem. What can I do? (Dev C++ newest version) (I tried reinstalling DEV C++)

Member Avatar
Member Avatar
+0 forum 5

Hello I am glad to find this site. I have been searching for help with learning C++, to no avil. So my question, which is multi-fold: I have a book from 10 years back or so, ansi compliant, should it work with dev-cpp. Second, I learned the difference between char and values, but when I look at the code the book shows, it looks like they are entering only values (like 1). And when I try to code a simple program like choose number one or two, then output one of two texts. It pops up as a cmd prompt …

Member Avatar
Member Avatar
+0 forum 9

[COLOR="Green"][B]Well, that's it, i'm trying to compile a dialog box:[/B][/COLOR] [CODE] case WM_COMMAND: switch(LOWORD(wParam)) { case ID_HELP_ABOUT: { int ret = DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_ABOUT), hwnd, [COLOR="Red"]AboutDlgProc);[/COLOR] if(ret == IDOK){ MessageBox(hwnd, "Dialog exited with IDOK.", "Notice", MB_OK | MB_ICONINFORMATION); } else if(ret == IDCANCEL){ MessageBox(hwnd, "Dialog exited with IDCANCEL.", "Notice", MB_OK | MB_ICONINFORMATION); } else if(ret == -1){ MessageBox(hwnd, "Dialog failed!", "Error", MB_OK | MB_ICONINFORMATION);[/CODE] [COLOR="green"]And i get this error:[/COLOR] [CODE]C:\\my\\pc\\programmain.cpp 'AboutDlgProc' was not declared in this scope[/CODE] [COLOR="green"]I'm using wxDevC++ does anyone knows the reason i get this error??[/COLOR] ( My headers are: #include <windows.h> #include "resource.h" , do i need …

Member Avatar
Member Avatar
+0 forum 6

The End.