49,761 Topics
| |
I am trying to create 2 different rendering windows using OpenGL. My code looks like: [CODE]void display1(){...} void display2(){...} void init(){... //some declarations and function calls pertaining to display2} int main(){ glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowSize(1024,512); glutInitWindowPosition(0, 0); glutCreateWindow("Window 1"); glutDisplayFunc(display1); glutPositionWindow(520,20); glutCreateWindow("Window 2"); init(); glutDisplayFunc(display2); glutMainLoop(); return 0; }[/CODE] The … | |
Question is : Get two strings from user. Join first string with the second string with a space. Store in another string and display it. Example: Enter first string: Hello Enter second string: World Hello World (built in function for string concatenation is not allowed) im newbie in c++ and … | |
I make a small project on student but i don't know about file handling for database; can any one tell me the simple way to connect my project to SQL database; | |
Hi all, I am new to ffmpeg and I tried using api-example.c to decode wma files. However when I run the program, it gave me an error saying "frame_len overflow". Does anyone know how to fix this error? Here is my code: [CODE]extern "C" { #include <avcodec.h> #include "../libavcodec/avcodec.h" #include … | |
Using Borland 4.5, yea its old but this is what my teacher prefers. Problems States: Markup Write a program that asks the user to enter and item's wholesale cost and its markup percentage. It should then display the item's retail price. For Example If an item's wholesale cost is 5.00 … | |
I'm programming with c & C++.Usually i'm programming in Codeblocks IDE.Sometimes i'm using Fedora(Linux) too.Plz can anybody tell me is there any difference between those two programming environments? | |
How can I change the file properties in c++? I would like to write in the file properties the author and time. | |
Hey guys, How would i get an imageBox Background image file location ? Thanks in advanced. | |
I have been working on a program that requires me to use bubble,insertion, and selection sort. My program runs without any compiler errors. I have printed out the total number of comparisons but I am having trouble trying to print out the array values for bubble,insertion, and selection sort. I … | |
Hi, I'm having some issues with my homework. It is a polymorphism homework. IFrom the console it takes two string (title and author/performer) a char (format for records) and a call number (int). Currently it compiles fine with some warning for strcpy. I have used the same data and sometimes … | |
Basically I'm working with a deck of cards for this. I was hoping to use time as a reference to pseudo-randomize the number of time's they would be shuffled, but I don't see a way to convert time to an integer form. Only to a string. If I used the … | |
Hi I am making a function that finds what todays date is & returns it as a string to main. (string format dd/mm/yy). My problem is I have found out how to find the day, month & year, but I cant put it into a string & return it to … | |
I have a list of numbers in a 2d array. I need a random number without repeating. The number zero cannot be shuffle. [CODE] int **map; int * list; void randomize(){ for ( int x=0;x<Width;x++) { for( int y = 0; y < Height; y++) { map[x][y]=list[x*y]; //add code } … | |
Hello, I have this C++ code, I dunno how it works.. Anyway, I'd like to have it translated to Delphi. If anyone can help me out, I'd be glad. [code] typedef void (*t_ChatPrint) ( char * ); t_ChatPrint ChatPrint = (t_ChatPrint)0x0054E410; void ChatPrintf( const char *format, ... ) { va_list … | |
Question is: Declare two arrays of size 5. Get input from the user. Declare a third array of size 10. Put the values of array1 in even indexes of array3 and values of array2 in odd indexes of array3. Example Array1 1 2 3 4 5 Array2 6 7 8 … | |
Hi, Is there ever a situation where the programmer needs to be concerned about the copying of a vtable pointer or can I happily assume that the C++ language will handle that detail correctly without my intervention? | |
Hey all, I've a couple of large enough vectors in my code, talking about 88200+ floats per vector. I wanna copy the contents of one into the other. I've read around, some say [code=c++]vector.swap ( otherVector );[/code] is fastest? Currently I'm using the following: [code=c++]for(int i =0; i < vector.size(); … | |
[CODE]#ifndef Prog_h #define Prog_h class Prog { public: int Array[]; int N; void ReadList(int Array[], int N); void Avgs (int Array[], int N, int &Ave, int &aveP, int &AveN); int Large (int Array[], int N); void Display(int Array[], int N, int Ave, int AveP, int AveN, int Max); }; #endif … | |
Hi I have a problem with vc++ (vs 2010 ultimate) debugger. I my code I use a path like this "madia/img.bmp". If I click "Start debugging" or "Start without debugging" the program doesn't load the file but if I enter the Debug folder and than double-click the exe file than … | |
Hi everyone! I know using "system" in c++ is not the best way to develop, however, I need to use it for some specific reason. I have read that it is advisable using before system(NULL) to check if there is a shell available. My question are: When is not going … | |
I'm having a problem with my program. I'm able to input all 10 numbers in but when it out puts the sum I get the wrong answer but then when it outputs my average that information is correct. I know it's a simple fix but I can't see it. Can … | |
Hi, I've just started using MSVC++ 10.0 express edition and I'm also a relative beginner in c++, and I have a few questions about the IDE. On the standard taskbar I've noticed a small drop down list containing the words Debug, Release and Configuration Manager. It is set to Debug … | |
Last error Im getting is error C2059: syntax error : ']' Anyone have any ideas? what it needs to do:write a c++ program that creates using a random number generation a 2 dimentional array of integers whos values range from -9 to 9. The array size is to be chosen … | |
what is virtual destructor in cpp?.. if any specific topic like virtual destructor please tell | |
Design and write Pseudocode for the following problems. 1. Display the table from one to ten for a number that is entered by the user from keyboard. The program should keep on asking for number and displaying tables until user presses escape key from keyboard. 2. The program should display … | |
Hi, I have a server which can handle multiple clients one-by-one i.e at a time it can connect with only one client. So how can I show the other pending client connections by printing their IP Addresses? I am using C/C++ as programming language. Someone please help me. | |
[code]template <int p> bool FComapare (Node *lId, Node* rId) { if(lId->getDiff(p) < rId->getDiff(p)) return true; else if(lId->getDiff(p) == rId->getDiff(p)) { if(lId->getLT() < rId->getLT()) return true; else if(lId->getLT() == rId->getLT()) return (lId->getTFG() < rId->getTFG()); } return false; } vector<set<Node*, bool (*)(Node*,Node*) > > m_F; for (int i = 0;i < partNum; … | |
Hello everyone, Can anyone please help me figure out what I miss or did wrong to my code for not to compile? below are the code I did and I just couldn't figure it out what I missed. Thanks. [CODE] #include <iostream> typedef struct NodeType { char name; // the … | |
hey guys, i am trying to make a program that overloads the istream with which you can create an object by asking from the user to enter values and you can use cin>>name_of_the_object to create it. My question is how can i ask the user to enter a certain hour … |
The End.