48,985 Topics

Member Avatar for
Member Avatar for cambalinho

heres the code that i use for put the form transparent: LONG style= GetWindowLong(hwnd, GWL_EXSTYLE); style=style | WS_EX_LAYERED; SetWindowLong(hwnd, GWL_EXSTYLE, style); SetLayeredWindowAttributes(hwnd, clrBackColor, NULL, LWA_COLORKEY); but i see problems :( the form and the controls are showed, but the mouse events are ignored. if i click on button or form, …

Member Avatar for cambalinho
0
6K
Member Avatar for Daneos

Hello, anyone can suggest me a simple lua wrapper with clean code? I want to call from c++ lua functions but I dont really get it.. I only know a little LUA and C++. Example lua function I have: Get the level: function Lv(a) local lv = GetChaAttr( a , …

Member Avatar for AceStryker
0
277
Member Avatar for rela

I am a beginner, and want to know how can run the code in notepad with visual studio. I tried with a simple code by --<<All Program -->microsoft Visual --> visual Studio tools --> visual Studio command prompmt. The error is: ''fatal error C1083: cannot open source file: filename.cpp: No …

Member Avatar for NathanOliver
0
664
Member Avatar for ivan3510

Hi! So, I made this code #include<iostream> #include<cstdlib> #include<pthread.h> using namespace std; const int m=6; const int n=5; const int s=5; const int r=8; const int num_thrd=3; class data{ public: int* A; int* B; int* C; int start; }; void* multiply(void* pod) { data* P=(data*)pod; for(int i=P->start;i<m;i+=num_thrd) { for(int j=0;j<r;j++) …

Member Avatar for ivan3510
1
211
Member Avatar for Sarkurd

Hi i tried to test some new features of C++ 11 but how come Visual Studio doesn't support `constexpr`? i tried this simple function but it won't compile constexpr int multiply(int x, int y) { return x * y; }

Member Avatar for Sarkurd
0
1K
Member Avatar for yazici.batuhan

Consider a stack module like (two files stack.h stack.cpp) which supports the these functions; void push (stack *, std::string); std::string & pop(stack &); bool isEmpty(stack &); std::string & top (stack *); I didnt understand this part what it means. Also I declared stack like; struct stack { … }; But …

Member Avatar for Moschops
0
309
Member Avatar for davecoventry

Forgive me if this is somewhat basic. If have an array of 20 strings defined: char const commands[20][20] = {// each command string will have a maximum of 20 chars. "quit", "open", "save", "close" }; I want to test the command value to see what action should be taken. int …

Member Avatar for NathanOliver
0
300
Member Avatar for sonu_1

hi to all user i am new in file handling , i know file handling but not much , my instructor taught me that use binary search tree in a file to search key value ,key value(like any thing such that record can be easily make out and comparision can …

Member Avatar for Rizwanrana786
0
396
Member Avatar for userasad

I have a text file and i want to replace a word from a specific location. For example want to replace 5th word from 12th line of file. How i can do that?

Member Avatar for Rizwanrana786
0
255
Member Avatar for surfingturtle

Dear members please help me in understanding the control flow in the following code, thanks #include <iostream> class constructs #include <iostream> class constructs { char inp; public: void acceptCharacter() { cout<<"Enter a character: "; cin>>inp; if(inp>='A') //ASCII value of A = 65 if(intp<='Z') //ASCII value of Z = 90 cout<<endl<<"Uppercase"; …

Member Avatar for surfingturtle
0
295
Member Avatar for anas930

how i plot the sensor(mpuc6050) coding in c++.and i want a program that show 2 sticks in dos screen...

Member Avatar for Hiroshe
0
48
Member Avatar for christinetom

Hi everybody. I hope nobody is working too hard. I am trying to figure out a way to use the peek() method of the stringstream class but looking more than one place forward. For example, if I use stringstream.peek() it will let me know the value one value ahead of …

Member Avatar for christinetom
0
2K
Member Avatar for myk45

Hello. Well, im a little confused as to what exactly the terms Data Abstraction and Data Encapsulation mean: This is what i read: [B]Data Abstraction[/B]:data abstraction is a process of representing the essential features without including implementation details. [B]Data Encapsulation:[/B]: Data encapsulation, also known as data hiding, is the mechanism …

Member Avatar for naaz.kaushik.3
0
871
Member Avatar for low1988

Hi, I have been assigned to a system integration project. However, I do not understand part of the integration implementation arhitecture. For example, I have a passport scanner connected to a Windows Client application constructed in C++. The client application would going to pass the passport picture, name, address etc, …

0
80
Member Avatar for Alxprog

Hi! Have anybody seen Scot Meyers' video on Universal references? In order for a reference to be "universal" two requirements should be fulfilled : 1)variable should have double ampersand after it's type : sometype&& 2) the type should be deduced . The second point is somewhat confusing to me: despite …

Member Avatar for mike_2000_17
0
314
Member Avatar for Daneos

Hello, I need for my game inventory function a mysql query which checks the next available free slot id. example: I have item on slot 1, 2, 3 and 5. Slot 4,6,7,8,9 ... are free.. Now I need query which would get the number 4. Something like SELECT * FROM …

Member Avatar for NathanOliver
0
342
Member Avatar for daniela.valkanova

> This compiles but does not show me any results? Why #include <iostream> #include <cmath> using namespace std; void dist(int x1, int x2, int y1, int y2) { double r1 , r2 , d ; r1 = sqrt((x1*x1) + (y1*y1)); r2 = sqrt((x2*x2) + (y2*y2)); d = sqrt((x2 - x1)*(x2 …

Member Avatar for NathanOliver
0
1K
Member Avatar for daniela.valkanova

void init1() { static int yrs = 1; cout << "The value of yrs is " << yrs << endl; yrs = yrs + 2; return; } void init2() { static int yrs; yrs = 1; cout << "The value of yrs is " << yrs << endl; yrs = …

Member Avatar for daniela.valkanova
0
147
Member Avatar for daniela.valkanova

#include <iostream> #include <cmath> using namespace std; double dist(int x1, int x2, int y1, int y2) { double r1 , r2 , d ; r1 = sqrt((x1*x1) + (y1*y1)); r2 = sqrt((x2*x2) + (y2*y2)); d = sqrt((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1)); cout << " …

Member Avatar for daniela.valkanova
0
281
Member Avatar for daniela.valkanova

> Write a C++ function named fracpart() that returns the fractional part of > any number passed to it. For example, if the number 256.879 is passed to fracpart(), the > number 0.879 should be returned. Have fracpart() call the whole() function you wrote in > Exercise 12. The number …

Member Avatar for daniela.valkanova
0
357
Member Avatar for nathan.pavlovsky

Hello programmers! I have been working on STL algorithms for some time now as a beginner, and I started doing an exercise, among which is the task of `use the fill algorithm to fill the entire array of strings named items with "hello"`. My code for this is below: // …

Member Avatar for nathan.pavlovsky
0
1K
Member Avatar for lewashby

In the following program I'm getting the warning -> unused variable ‘fn’. I'm following along with a book so I don't know why it gave me that portion of code if it's unusable. Also, I don't understand this line at all. -> `void(*fn)(int& a, int* b) = add;` #include <iostream> …

Member Avatar for sepp2k
0
187
Member Avatar for sbesch

I am interested in getting some opinions on the use of include files to sub-divide a large module into functionally related groups. What I'm interested in is opening a discussion on best practices and minimal requirements. Here's the scenario: I am working with a library with 200+ functions. They naturally …

Member Avatar for mike_2000_17
0
273
Member Avatar for Fazelessmetal

/* USE IT HOWEVER YOU WANT :D */ #include <iostream> #include <string> #include <fstream> #include <cstdlib> using namespace std; char name[100]; wchar_t words[100]; int choice; int chmon; int level; int main (int argc, char *argv[]) { //main string used("this game is cool"); string in; cout<<"Hello Welcome to the Code Game!"<<endl; …

Member Avatar for ddanbe
0
175
Member Avatar for Fazelessmetal

/* Written by HAYZAM SHERIF ! USE IT HOWEVER YOU WANT :D */ #include <iostream> #include <string> using namespace std; char name[100]; wchar_t words[100]; int choice; int main() { //main string userstring; string mystring; mystring = "THIS GAME IS COOL"; cout<<"Hello Welcome to the Code Game!"<<endl; cout<<"--------------x----------------"<<endl; cout<<endl; cout<<"Please enter …

Member Avatar for deceptikon
0
166
Member Avatar for Jjajangmyeon

I've hit a wall. I'm trying to open a .txt file and then copy it's contents into an array of character arrays. Can someone point in me in the right direction. I've been at this for about 2 days now and haven't made any head way. Below is a sample …

Member Avatar for Jjajangmyeon
0
11K
Member Avatar for Fazelessmetal

#include <iostream> #include <string> using namespace std; int main() { string x; cout<<"Enter Text : "<<endl; cin>>x; getline(cin,x); cout<<"The text entered was, "; cout<<x; system("PAUSE"); return 0; } Output that I get when I enter 1 word : Enter Text : LOL The text entered was, Press any key to …

Member Avatar for NathanOliver
0
346
Member Avatar for myk45

Hi, I have a Qt based tool and I want to add a QtWidget(button) in the gui which will act as a help button for my tool just like the windows help button for any application. The help button when pressed should display some text information in the form of …

Member Avatar for mike_2000_17
0
171
Member Avatar for okeidowu
Member Avatar for messr135

I'm making a word unscrambler, an anagram solver of sorts. So, I've stored all possible variations of the word in storedstrings which is an array of strings. Now, i need to delete all the same strings in storedstrings and then store the unique strings in another array of strings. This …

Member Avatar for David W
0
396

The End.