49,761 Topics
| |
And the question is - how to include a window inside the window? I want to include at my main window with options and buttons one other with Direct3d graphics on another thread. | |
////////////////////////////////////////////////////////////////////////////////// // Now I have an idea how to get my strings from the file so that I can properly // play with them (with fstream I did not have the string "in my clutches" quite // the way I wanted it). However, now I have a problem with my … | |
Hi, I'm using Codeblocks as a compiler. So when i'm creating a new class by following File>New>Class it creates two files xxxx.h xxxx.cpp Ok, code is simple. [CODE]#include <iostream> #include "Sally.h" using namespace std; int main(){ Sally so; } [/CODE] Sally.h [CODE]#ifndef SALLY_H #define SALLY_H class Sally { public: Sally(); … | |
i am trying to write a program for friend functions but it isnt working. :( [CODE] #include <iostream> using namespace std; class Z; { private: int a; friend void fn(); }; void fn() { Z one; one.a=5; cout<<a<<endl; } int main() { fn(); return 0; }[/CODE] can someone please tell … | |
Alright, I decided to try ClanLib. I've been reluctant to use it, because it requires Visual C++, which is foreign to me. I usually use Code::Blocks. Anyway, I'm trying to get the hang of VC++. It seems to have a lot of features I haven't dealt with, like solutions. To … | |
Hi, I want to know how to make a C++ wrapper class. Ex. Plugin.hpp if i have coded for Plugin.h and Plugin.cpp | |
//////////////////////////////////////////////////////////////////////////////////////// // In this little project I am trying to learn to get and manipulate data from // a file input using fstream strings I also wanted to use the formating available // with the printf and related string handling methods. I have a question in regards // to the … | |
guys i think there is a mistake in my code but i dont know where. Can anybody tell me ?? here's my code. [CODE]#include "DarkGDK.h" #include "Inventor.h" void DarkGDK ( void ) { dbSyncOn ( ); dbSyncRate ( 60 ); dbMaximizeWindow (); float fCameraAngleX = 0.0; float fCameraAngleY = 0.0; … | |
I trying to get the hang of link list, but very time a write one i fail miserably... [CODE]struct node { int data; node *next; }; int main() { node *head = new node; head = NULL; node *temp = head; //node 1 temp->data = 1; temp->next = NULL; temp … | |
title is self explanatory how do i convert it to a std::string? all this LP stuff makes my brain hurt... | |
[code] #include <iostream> int main() { std::cout << "Merry Christmas Everyone!"; return 0; }[/code] | |
Hey guys. I am trying to figure out how to write a lottery program that will generate random numbers from 10-30 and ask the user for random numbers as well. The program should not accept numbers under 10 or above 30 from the user and the program should compare the … | |
Question:I am not able to start the codes of project in c++. Your clock has gone dead because you forgot to wind it or replace the battery, or you had a power outage. This clock has hands, so you must turn them to adjust the time. Which way, and how … | |
I want to write a wrapper around MySQL but I will in future extend it to support other databases. I will cover only nasic useful features (commons) but it should be extensible in future with minimal change. I want to write an interface but I cannot get good tutorial to … | |
I write letter, it checks vowel or not but could not achieve for the capital letter without using if loop help me [CODE]#include <cstdlib> #include <iostream> #include "stdio.h" #include "conio.h" #include "string.h" using namespace std; int main(int argc, char *argv[]) { int a,b; char ch; printf("Enter Letter="); scanf("%c",&ch); if (ch==a) … | |
I need to know how to calculate in c++,using oracle.In this case i must know how to join table.Can I know how this can be done. Thanks. Anjana89 | |
i have a prob with my code.. [CODE]#include "ml.h" #include "highgui.h" #include "cv.h" #include <iostream.h> //IplImage* img = new IplImage(mat); //IplImage iplimg = mat; and just use &iplimg wherever you need an IplImage. There is no need for dynamic allocation #define TRAIN_SAMPLE_COUNT 150 #define SIGMA 60 void main( int argc, … | |
This is not giving right output :((( [CODE]#include<iostream.h> #include<conio.h> using namespace std; int main() { char c[80],d[80]; cout<<"Enter a string = "; cin.get(c,80); strcpy(c,d); strrev(d); cout<<"String = "<<c; cout<<"Reverse word "<<d; getch(); return 0; }[/CODE] | |
need some help with an odd magic square assignment please 1)is there a limit my code should have as to the odd integer the user can input? 2)as far as declearing my array i think i need numbers inside those braces right, i just cant put in the user's odd … | |
Could someone help me with this code? When I compile & run my project, it says "Battlefront.exe has stopped working. Windows is looking for a solution to this problem" This is my code: [CODE]//----------------------------------------------- /// Battlefront.cpp Source Code File /// Part of the Battlefront.cbp Code::Blocks Project //----------------------------------------------- /// This file's … | |
Hello, I made the following code to convert known datatypes to bytes: [CODE]template <class T> void convertToByte(const T *t, PBYTE pbArray) { DWORD dwSize = sizeof(T); memset(pbArray, 0, dwSize); memcpy_s(pbArray, dwSize, reinterpret_cast<LPCVOID>(t), dwSize); } [/CODE] But i was wondering how i'd go about it without passing a datatype into the … | |
I know that there is a sticky thread and i know that maybe i repeating things that already mentioned but i am totally confused. I am interested to study about game programming,i don't study i bought a book and i am near to finish it about c++. i goggled and … | |
Can anyone please explain me about callback functions with examples? | |
Hi community First I want to thank everyone who will look through this, because it's a longer post. I'm currently reading a book on AI by Mat Buckland. I'm re-building Mats entitymanager, though I just copied it. He used std::map to collect all entities as pointers which are cross referenced … | |
I'd like to spend some time killing my brain cells over a small program which nevertheless uses appreciably high logic, e.g. some scientific application. I'd classify myself as a mid-range, so please go easy. Thanks! | |
hello,i must solve this problem : "Sum all even digits of a given number. That's what i've got so far. [CODE] #include <iostream> using namespace std; int main() { int sum = 0 , num; cin>>num; while(num > 0) { sum+=num%10; num/=10; } cout<<sum; return 0; } [/CODE] the problem … | |
Hi guys. Im a noob programmer trying to make a trainer. This is just for hobby. I been using borland c++ builder. I made my dialog and button. I need the button to when pressed access a process and change the value of 5 offsets. I have the offsets and … | |
Hi, I have to develop a C++ programme for airplane booking company where I have a one plane and 42 seats in the plane There are 1st class and 2nd class and somking and nonsmoking areas. this is a assignment I have to do. I dont need any code but … | |
what is the difference of running program in codeblocks,Blooshed and Visual C++ | |
I wonder why it ain't possible to manipulate with static member of base class from derived class. [CODE]#include <cstdlib> #include <iostream> using namespace std; class Base{ public: static double BaseValue; void Set(double a){BaseValue=a;} void GetBaseValue(){cout<<BaseValue<<endl;}}; class Derived:public Base{ public: double Count(){ return BaseValue*2; } }; int main(int argc, char *argv[]) … |
The End.