51,593 Topics
![]() | |
Hi, I want to put GLSL shader in my game to get realistic shadows and lighting. But when I use polygons GL_POLYGON ,they are totally black. Only thing that works OK with shader is glutSolid bullshit like glutSolidTeapot and glutSolidCube and so on. So I wanted to know the source … | |
Hi, I have 2 questions about the scrollbars on the Form. 1. Is it possible to change the Width of the scrollbar control itself? (Ex: for the vertical scrollbar in this browser window is about 1 cm.) 2. Is it possible to change the Color of the scrollbar in any … | |
Hi, It is possible to drag a Forms width. What I want is to prevent a user to drag the Forms width more than the value 405. I have tried out with the code below but nothing happens when I drag the width of the form. Thanks! [CODE] private: System::Void … | |
my prof give us assignment but she doesn't explain what to do im just asking what will be the code to this problem: write a program that will find the area of square.. (look for the relevant formula) ty for the one who will help ty very much | |
I have a problem with recursive imports in C++. I have this 2 classes: [CODE] //File A.h #include "B.h" class A{ public: A(){}; void doA(B b){ b.doB(); } } [/CODE] [CODE] //File B.h #include "A.h" class B{ public: B(){}; void doB(A a){ a.doA(); } } [/CODE] I tried to use … | |
Hiya, Im trying make a simple cards game and i was wondering how in c++ can i use the characters ♠ ♣ ♥ ♦ , i think it would be betetr than me printing out the words each time, Are these in some extended character set anywhere? i tried googling … | |
[CODE] #include <cstdlib> #include <conio.h> #include <fstream> #include <sys\stat.h> #include <string> #include <iostream> #include <iomanip> using namespace std; struct Student_Record { string name; int id; string ic; string parentName; string address; int telNum, parentTelNum; bool deleted; }; Student_Record Student; #define STUDENT_NAME "Student.txt" Student_Record Employee; char choice; fstream *fs = NULL, … | |
Im trying to create a boost thread which executes the following static function. [code=c] Updater::UpdateTrack(const std::string& sFolder) { //Do something } [/code] I cant seem to figure out how to pass the argument to the function i tried the following: [code=c] m_UpdateThread = boost::thread(&Updater::UpdateTrack,"test"); [/code] [code=c] m_UpdateThread = boost::thread(boost::bind(&Updater::UpdateTrack,"test")); [/code] … | |
[CODE=C++] #include <stdio.h> int main() { int iBAF=10; int iPlots=14; double dblFactor; dblFactor=iBAF/iPlots; //to get a floating point you need a cast! printf("dblFactor = %10.6f\n",dblFactor); return 0; } /* dblFactor = 0.000000 */ [/CODE] I thought C/C++ would offer a few benifits beyond pure assembler. Apparently I was wrong. | |
hi every body this is my first post in this wonderfull web site i'm a biggener in c++ and i have a q i want to do a function that determines whether a number is prime and then use this function in a program that prints all the prime numbers … | |
Hey Everyone, I'm compiling a code that reads characters from a file and puts them in a linked list. No problem with the Linked List but my ifstream acts weird. When it reads from the file everything goes somoothly, but at the end, when it reads that last WORD, it … | |
Hello Dear All Friends, Im learning c++ about 4 months.. Im just only using Dev c++. The reason why Im creating this thread is to check with ur all that which application is the best for me to create a system. I mean create a GUI that can make lot … | |
good day.. i am starting to learn..and experiment in namespaces just simple one... calling void functions..then print f.h [CODE]#include<iostream> #include<limits> namespace A { void f() { std::cout<< "Testing \"void f()\""; std::cout<<std::endl; } }[/CODE] f.cpp [CODE]#include "f.h" int main () { A::f(); std::cin.ignore(std::numeric_limits<std::streamsize>::max(),'\n'); std::cin.get(); } [/CODE] g.h [CODE]#include<iostream> #include<limits> namespace A … | |
hi i have a .txt file containg data like __________________________________________________________________ Date Time ABC GD INo P mo SRD T 11/07/2010 9:24PM, 21.46 7.25,0000000025,0000001245,12000000,23.24 11/07/2010 9:34PM, 21.46 6.25,0000000025,0000001245,12000000,23.24 11/07/2010 9:44PM, 22.60 6.25,0000000025,0000001245,12000000,23.24 11/07/2010 9:54PM, 23.90 5.25,0000000025,0000001245,12000000,23.24 11/07/2010 10:04PM, 21.46 6.25,0000000025,0000001245,12000000,23.24 11/07/2010 10:14PM, 21.60 4.15,0000000025,0000001245,12000000,23.24 11/07/2010 10:24PM, 25.40 7.75,0000000025,0000001245,12000000,23.24 11/07/2010 10:34PM, 21.46 … | |
Hello How do I combine hexadecimal numbers? For example if I have the numbers: - aa - 14 - 5d How can I combine them to get : aa145d ? | |
I have the heading down but how do I output the names and numbers including total? Does it involve calculation? Also, how do I make it so they're aligned pretty? Can someone help me with this whole process? Here it is: This payroll program calculates an individual employee pay and … | |
Hello, I'm almost completely useless at C, and as part of a project I've got to conjure up a programme, and I'm just hoping someone can give me push to get it started. I want to make a programme where the user can draw a CIRCLE, SQUARE, LINE and POLYGON … | |
Hello I need to modify this code to have only the first character of whatever word inputted be capitalized. I have this one that shows all the characters capitalized, but I need to modify it using isspace(). #include <stdio.h> #include <iostream> using namespace std; int main () { char c, … | |
hello guys . i want to learn c++ untill i become able to create advanced softwares.so please tell what am i saposed to read to be what i want to be like all files types and where can i get the lessons for free | |
I am having problems primarily with the sorting function. What I need is for the polynomials after being entered to be sorted from the highest exponent to the lowest and then added and to have that displayed. The other thing is that I need to do a pushback for the … | |
The title in and of itself is fairly descriptive, however, I am looking for some help. I am writing a program which reads the output of a command-line based program and puts that output to a GUI. Due to my need of asynchronous i/o, I have had suggestions to use … | |
Hey I am new to this forum and to OOP please help me in developing window and to change the background color when i execute my program..... I am using Dev C++ of bloodshed[code][/code] | |
I am working on a school assignment and have gotten my code down to one error, but I've tried multiple changes and can't figure out how to fix it. I am trying to pass an array from my main() to my class and then have it print out when called. … | |
the hex value 00 00 00 00 00 BC 61 4E (LSB) which is stored in string as char data[8] = {0x4E, 0x61, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00}; now i want to convert it into int (equivalent of above hex string is 12345678) i have below code char a … | |
I'm getting an error saying: error: passing `const model::container::Item' as `this' argument of `void model::container::Item::get_fields()' discards qualifiers I'm getting the message for each of the getters in my class which are declared like this [code=c] const int& division()const{ get_fields(); return division_; } [/code] I'm assuming I'm getting this error because … | |
Hi,Is someone could help me how is it possible to implement Generalized Linked Lists? I've implemented it somehow but I'm not sure it works or not. Now I'm going to print the nodes I've implemented.When I want to declare the print function in class Glist with first1 argument,I get this … | |
Hi all, I am having a problem when trying to compile this. from compiler: error: name lookup of 'pixel_number' changed for new ISO 'for' scoping error: obsolete binding at 'pixel_number' I understand that I cannot use the pixel_number variable outside of the for loop, have read so in other posts. … | |
I'm trying to write a Tic Tac Toe game but I'm stuck at the computer AI. Basically for the computer move I need a random generator to pick a number and insert it into a 2D array. The parts that I'm stuck at is writing a code so that computer … | |
Hi I am writing a c++ program to implement a symbol table. I am trying to view the symbol table which the gcc or any other compiler uses before i get started...how do i do that ??? | |
hi there, currently i starting to learn C++.i using VC++ 2010.hmm,i want to ask why this code must be compile under console application [CODE]#include <iostream> int main() { std::cout << "123"; return 0; }[/CODE] | |
Hey community members, I'm just from an unsatisfactory search through Google. I'm trying at a program that automatically reads in numerical values dumped into a file by an Algebra software. Problem is, whenever I try to sort out numbers they are not appearing the way I want them to. These … | |
What is the difference Between those types of initializing An array called "IntegerArray" With 5 element : [CODE] int IntegerArray[5] = {0}; int IntegerArray[5] = {0,0,0,0,0}; int IntegerArray[5] = {10,20,30,40,50}; int IntegerArray[] = {10,20,30,40,50};[/CODE] Please i need an obvious explanation for each line as i am confused..... Thanks for reading............... | |
Hey guys, First post here. This community looks create. I'm working on a final school project and we must move the cursor to a designated position without the use of: mouse_event() SetCursorPos() we then need to perform a check to say if the position is correct with the numbers we … | |
when i enter '1' .. the cout is connected,i cant even input the 1st line,which is the 'name = '.. help me pls. [CODE]#include<iostream> #include<string> using namespace std; void main() { int input; int choose; string name; string icNum; string parentName; string address; string TelNum, parentTelNum; cout << "\n\t\t\t STUDENT … | |
Hi all, why do I get an error with this line of code? [CODE]string test("a" + "b" + "c");[/CODE] error C2110: '+' : cannot add two pointers I have included the string class. thanks. | |
just want to design a software that called reminder sofrware. Its like resource project.And ı dont know even how to start. Its gonna be a software that is designed to alert the user of important events that they have input to the program and the program provide a calendar and/or … | |
lost!!! I took a homework assignment that worked written in just main and for practice I wanted to make them classes with pointers and have one derived class of base. Although the while loop, for the most part worked before it was turned into a class, it now does not … | |
Hi all.. I want to know the file descriptor of a file that I have opened in my program. I know open(char*,int,int) returns a file descriptor. What if use fstream out("...").. Is there any way to know the file descriptor this way?? thnx. | |
I'm experimenting with GDI+. Say I have a box and want it to move across the screen on a keypress. Do I have to clear the screen and redraw everything everytime I want to move the box? Or is there a way to just change the coordinates of the box? | |
can you guys help me out i dont know any of the c++ functions and i dont know how to convert this tnx in advance [CODE]#include <iostream> #include <stdlib.h> #include <fstream> using namespace std; struct student { char fname[100]; char lname[100]; int id; float cgpa; }; int add( student * … | |
hello guys , i want to earn c++ but i dont have it's compiler but i have c compiler so can i use it or i need c++ compiler and where can i get it | |
Hey guys. I coded the following program below: but I have a problem... I think its perhaps the logic I have used is not too good... here it goes... The program below should: ask the user to enter a letter ('a' to 'z' or 'A' to 'Z') and outputs VOWEL … | |
I am new here and this is my first post so I'm sorry if anything in this post is done incorrectly. I have taken a C++ class but did not get into any object oriented parts of it (all linear). Now I am in an object oriented class which is … | |
Sorry for the new questions... I've created this program to display a table . How could I write this code using while statements instead of for? [code]#include <iostream> using namespace std; int main() { for (int x = 1; x < 4; x++ ) { cout << x << " … | |
Please help me try to figure this out. Keep getting this error, error C3861: 'intialbid': identifier not found Can't figure out how to fix it, here is my code, the program is not finished. [CODE] #include "stdafx.h" #include <iostream> using namespace std; #include "myfuncs.h" int main() { do { char … | |
Hello! :) I'm trying to achieve an 'engine' of a kind in a DLL project. I have successfully made a DLL that works, but as simple as Hello World. Now I'm coding a framework into the DLL project, but I'm having some trouble with the singleton function. Im getting this … | |
Hello,i had to write a paper about data structutes implemented using STL,and I was wondering if anyone can answer this question for me for the conclusion of the paper: 1) What can i say about the results obtained with STL when implementin Data Structures 2)Future research about data tsructures using … | |
I just finished a small winsock program for sending files, but its soooooooooooooooooooooooooooooooooooooooooooooooooooooooo slooooowwwwwwwwwwwwwwwww:yawn: so I am hoping someone here may be able to offer me some advice. so far, the program works as follows: 1. User1 chooses a file and attempts to send it. 2. User2 chooses to accept … | |
I have this program, when it starts, i am unable to press numbers. By pressing F this turns the numbers on. However, the result is, i have to hold down F to use the numbers. I thought declaring ignition as true would stick after i had released F. And pressing … |
The End.