49,761 Topics

Member Avatar for
Member Avatar for takken1

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 …

Member Avatar for SgtMe
0
88
Member Avatar for AmerJamil

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 …

Member Avatar for AmerJamil
0
193
Member Avatar for pawan_sharma777

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;

Member Avatar for pawan_sharma777
0
457
Member Avatar for Yuichi

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 …

0
148
Member Avatar for Lando_

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 …

Member Avatar for jember
0
2K
Member Avatar for pro_learner

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?

Member Avatar for pro_learner
0
231
Member Avatar for alexchen

How can I change the file properties in c++? I would like to write in the file properties the author and time.

Member Avatar for Dingbats
-2
62
Member Avatar for Martje
Member Avatar for Martje
0
160
Member Avatar for sharifyboy7

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 …

Member Avatar for Fbody
0
250
Member Avatar for losh177

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 …

Member Avatar for losh177
0
102
Member Avatar for Lightslei

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 …

Member Avatar for WaltP
0
27
Member Avatar for gretty

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 …

Member Avatar for WaltP
0
1K
Member Avatar for alexchen

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 } …

Member Avatar for jonsca
0
123
Member Avatar for lelejau

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 …

Member Avatar for lelejau
0
114
Member Avatar for AmerJamil

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 …

Member Avatar for Narue
0
252
Member Avatar for gerard4143

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?

Member Avatar for gerard4143
0
216
Member Avatar for harryhaaren

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(); …

Member Avatar for Narue
0
4K
Member Avatar for icasta13

[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 …

Member Avatar for Fbody
0
114
Member Avatar for gisek

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 …

Member Avatar for gisek
0
260
Member Avatar for tikoti

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 …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for blueyelunatic

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 …

Member Avatar for jonsca
0
87
Member Avatar for deanus

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 …

Member Avatar for chiwawa10
0
138
Member Avatar for renork

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 …

Member Avatar for icasta13
0
843
Member Avatar for varunsara

what is virtual destructor in cpp?.. if any specific topic like virtual destructor please tell

Member Avatar for Nick Evan
0
51
Member Avatar for pretty_girl90

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 …

Member Avatar for jember
-1
140
Member Avatar for varunsara
Member Avatar for Jason Giggs
0
77
Member Avatar for Raja Paul

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.

0
52
Member Avatar for yakovm

[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; …

Member Avatar for vijayan121
0
105
Member Avatar for MAbebe

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 …

Member Avatar for FutureWebDev
0
451
Member Avatar for MysticMan3000

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 …

Member Avatar for jonsca
0
145

The End.