49,761 Topics
| |
Hey all, I am currently trying (desperately trying if I might add) learning how to use GLUT for school. Our professor gave us an assignment to make a 2d tube of some sort, but I only managed to make a circle. The tube will be only displayed on its front … | |
Hi, I have a doubt regarding inheritance of base class constructor by inherited class. I was recently going through some C++ online tutorial when I came across this piece of code: [CODE=c]#include <iostream> class Foo { public: Foo() { std::cout << "Foo's constructor" << std::endl; } }; class Bar : … | |
Hello everyone.. When working with Visual Studio 2010, the "MessageBox" function displays chinese characters, instead of english ones. Example: I attempted to prompt a message to myself using the messagebox function, saying "Success!" However, the message box pops up a message in chinese, and not in english. I am able … | |
I am confused. Here is the source: [url]http://www.learncpp.com/cpp-tutorial/28-constants/[/url] [QUOTE] Literal constants Literal constants are literal numbers inserted into the code. They are constants because you can’t change their values.[/QUOTE] Why can't we change literal constant? I mean if we want to initialize something, let say [CODE]int x = 14;[/CODE] And … | |
I just started to get a grasp of classes. I can't find my answer anywhere, and I hope someone on here can answer it. I am trying to simlate a battle [B]USING CLASSES[/B] Everywhere I look on the net people in C++ don't use classes to simulate battles. You could … | |
Hey guys, I'm new here. I just started learning c++ and I'm having a few problems. I have looked for one online but I found none that really worked for me so I tried to make my own. I'm trying to make a constant frame rate at 30 frames per … | |
Hi,I am new to daniweb and would like to know the error in this code [CODE] void initpoly(struct poly *p) { int i; p->noofterms=0; for(i=0;i<MAX;i++) { p->t[i].coeff=0; p->t[i].exp=0; } }[/CODE] I am not posting the entire program because it is lengthy.I am getting the error"Expected primary expression before token ;" … | |
Hey,can anyone tell me how to invoke a new application/software using c++ or visual c++. Also, gor interfacing a gui with my c++ code,should i go for vc++? | |
oh my please help me..i;m making a simple code in c++ using dev c because i am exploring this language for my second year. i do not know why it will not display the output..i don't know how to use cin..[CODE]#include <iostream> using namespace std; int main() { cout << … | |
Below is my code: [CODE]#include "stdafx.h" #include "strlib.h" #include "simpio.h" #include "genlib.h" int _tmain(int argc, _TCHAR* argv[]) { int num1,nom1,num2,nom2,num3,nom3,num4,nom4; double nem1,nem2,nem3,nem4; string a,b,c,d; printf("Enter first name: "); a=GetLine(); printf("Enter games played for %s: ",a); num1=GetInteger(); printf("Games won for %s: ",a); nom1=GetInteger(); nem1=(nom1/num1)*100; printf("\n"); printf("Enter second name: "); b=GetLine(); printf("Enter … | |
I am developing a payroll program for my programming class. I need to declare the Int as a double in order to produce the product for number of employees in a department times the average salary for each employee. Can someone take a look at me code and let me … | |
I am a computer science student and i want to know how to create a c++ program to ping an ip address and check whether it is online or not? | |
The program needs to ask for n and then output the first n terms of the Fibonacci sequence. exp. n = 6 1, 1, 2, 3, 5, 8 1+1 =2 2+1=3 3+2=5 5+3=8 My origional program used a nested for loop. I am not sure if that is right to … | |
Hey Everyone I am having troubles. i tried looking up how to make the main for invisable but i cant figure out how. i saw some examples but they made no scence to me. What i am trying to do is change from one form to another and hide the … | |
What is the most comprehensive book/online source for multithreading? Thanks! | |
his is a follow up to the question I asked earlier and with the help of some people here I was able to start up with the function I want to write,but I am yet to complete it. Here is my earlier question: I have a series of files with … | |
was the idea of nested functions considered to be useless during the time of developing older c++ standard, because its usage is basically covered by another concept like object-oriented programming; or it wasn't implemented just as a matter of simplification? | |
Please tell me any good C++ compiler which works correctly on window 7 | |
Trying to figure out how to write this program. I need some immediate help! Define a base class person that will contain universal information, including name, address, birth date, gender and identification (student, worker etc). Derive from this class the following classes: Student Worker Student_worker Add variable school for student … | |
I'm trying to merge two trees. This is the recursive function: [CODE] void Merge(node *primary,node *secondary) { if(secondary != NULL && primary != NULL) { Merge(primary->left,secondary->left); Merge(primary->right,secondary->right); } else if(secondary != NULL && primary == NULL) { primary = new node; primary->action = secondary->action; primary->left = NULL; primary->right = NULL; … | |
Simply put I wish for text entered in one edit box to then appear in another edit box. I have created a MFC dialog and read many tutorials, but I'm still stuck. Here is my current DDX function: void Ctextentry23Dlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); DDX_Text(pDX, IDC_EDIT1, name); DDV_MaxChars(pDX, name, 20); DDX_Text(pDX, … | |
To avoid double postings kindly refer the thread here, since I couldn't make up, which forum was best suited. [URL="http://www.daniweb.com/forums/post1297528.html#post1297528"]http://www.daniweb.com/forums/post1297528.html#post1297528[/URL] Please do take part in the discussion. Regards, Nisheeth Barthwal | |
hi i have created a matrix of 9 edit boxes. 3x3... i want to change the background color of the edit boxes during their creation. how should i do that ? thanks in advance... | |
Basically I'm trying to use an array to store inventory data, and I'm a little (lot) lost with vectors and such. I feel a little guilty asking for help three times in a day, but alas the semester is winding down and I'm in a crunch. My class (or should … | |
Hello, I'm learning C++ and trying to build my own file zipper, because i like very much to work with zip files, but now i want to build my own zipper and it's so hard to find good resources to start. As you can see in my previous posts i … | |
i have created 9 edit boxes using MyEditBox->Create()... now when i click on button, the previous values should be erased and new values should be populated... how should i do that ? thanks | |
I would just like to ask if in declaring methods in your class at C++ you would always do this: [CODE]public: void ListInsert(position,item,success); void ListDelete(position,success); void ListLength(void); void ListIsEmpty(void); [/CODE] i am to create adt list using the basic funtions but i can't start..whew! | |
Hi, I've developed a console app and a win32 api GUI. The GUI is only used to get input file path and output file path specified by the user, as simple as that. I now want to pass those file path and call the functions in my console app to … | |
Hey guys, is there anyway a C++ program will continue to execute and not pause when I run a program for it? E.g I've already got [CODE] system("iTunes.exe.lnk"); main(); [/CODE] It calls main after it executes the program, but it is paused until I exit iTunes, is there anyway to … | |
Hello, I am currently working on body detection and face recognition using OpenCV. But I want to create a GUI using Visual C++. I am unfamiliar with it, so I wanted to know if anyone has any tutorials or what can lead me into the right direction. Thanks in advance … |
The End.