49,756 Topics
![]() | |
Hello, I've got a question about the IOCP Thread pooling. How do I create such pools? Do I need to create some threads (I know about the 2*CPU rule) with the same function? Anyone care to explain me some? I'm new to IOCP, I already have some experience in Network … | |
The only error stated is at "N_showdata.N_enterData();" which says "error C2660: 'NomineeData::N_enterData' : function does not take 0 arguments" [CODE]#include<iostream> #include<conio.h> #include<string> using namespace std; class MemberData { private: int ID ; char Name[60]; char Add[60]; char Tel[15]; public: void enterData(); void showData(void); }; void MemberData::enterData() { cout << "Please … | |
Mingw shows [code] ----- CurlT ( MAIN GCC DEBUG DEBUG_FULL BLITZ WIN32 ) curl.cpp C:\MyApps\CurlT\curl.cpp: In function 'void* getfile(std::string, char*)': C:\MyApps\CurlT\curl.cpp:39: warning: cannot pass objects of non-POD type 'struct std::string' through '...'; call will abort at runtime C:\MyApps\CurlT\curl.cpp: In function 'int main()': C:\MyApps\CurlT\curl.cpp:57: warning: deprecated conversion from string constant to … | |
Ok, so I'm writing a program to convert decimal into binary. It all works with the exception that my binary shows up in reverse order and I'm having trouble with reversing the array of chars in my intToBinaryString() function. Any tips on how to get this started? [CODE]#include<iostream> #include<cstring> using … | |
Hey, at my camp, I made a random 3D maze gen off of OpenGL So, I downloaded OpenGL 3.7, and I placed the glut.dll in the right place, the header file in the right place, the lib file in the right place etc. But my conflict is that I used … | |
Hello. im a student working in C++ and im fairly new to both C++ and i guess this community.(i was reccomended to come here if i had problems) im just doing some simple exercises or s it seemed. here is the question. Write a C++ program with a case structure. … | |
hi ive developed a code to sort 3 numbers and pick out the middle one. the numbers are distinct. #include<iostream> using namespace std; int main( ) { int X, Y, Z; cout<<"please 1st number "; cin>>X; cout<<"please 2nd number "; cin>>Y; cout<<"please 3rd number "; cin>>Z; if (Z>X>Y) (Y>X>Z) cout<<"this … | |
I am porting software from a VS compiled program to my Mac. In this code, __m128's are used ALOT. An example of this error would be: Projector.cpp:1014: error: request for member ‘m128_f32’ in ‘v4Max.Vector4::fVector[2]’, which is of non-class type ‘float __vector__’ I have included both xmmintrin.h and emmintrin.h, but the … | |
Hey, im new to the forum. I can code simple programs easily, like I coded a random maze generator with some help. But I was wondering if someone could teach me how to make the source for the practice and explain to me why you coded it that way. Write … | |
Does anyone know how one would go about creating a "custom" file type? (Such as Macromedia Flash's .swf.. or quicktime's .mov) Also.. once I have created a custom file type... how would I make sure that my file is always associated with a given icon (that I will create).. and … | |
Hello Everyone , I'am new to OOP and QT and i'm trying to write a simple chat program (client , server) with winsockets. I Have an error which i don't seem to understand : this is my code so far : [CODE] #include "pmessenger.h" #include "ui_pmessenger.h" #include <QMessageBox> #include <winsock2.h> … | |
I have two classes and one of them is inherited from the other class. Class Person - used to store first name and last name of a person. The data members are protected. Class Candidate - used to store votes of an election, and this is inherited from Person class … | |
Take a look at this program. [CODE] #include <iostream> using namespace std; struct Node { int data; Node* link; Node() { data = 0; link = NULL; } }; void destroy(Node* &p) { Node* pre; while(p !=NULL) { pre = p; p = p->link; delete pre; // When running for … | |
Hi there, I'm new to the forum so please be kind :) I've created a class called node that has a standard constructor and an overload that uses an int as an argument. [code=c]class node { public: node(void); node(int inputs); ... };[/code] I can create an dynamic array of nodes … | |
Hello everyone, I've found out that the [I]friend[/I] keyword can be used with a class or a function/method but I'm wondering if it's possible to do something like this : [CODE=C++]class A; class B; class A { private: friend class B void AddEl(void *el); friend class B void RemEl(void *el); … | |
I realize that there are plenty of tutorials on how to create a "Custom Win32 Title Bar." The problem is.. none of the tutorials I have found so far.. discusses how a person would be able to "drag" the replaced title bar.. as one would drag the "normal" title bar. … | |
hey folks, i have a problem which seems to be reasonably simple but i havnt managed to figure it out yet. Iv read alot of the other threads on this but i still havnt found one that iv both understood and solved my problem. So here goes... Its concerning returning … | |
I have a design question which I have not been able to find a satisfactory answer for by searching. Essentially, I have a class - Base - that contains a vector of pointers to another class - Node. However, I would like to be able extend both the Base and … | |
Guys, could someone help me to make a program that will display this not using if-else statement. I want to learn how to make it using for loop statement and any statement that will make this program short. I need 1 Program using for loop and another program but not … | |
Hi everyone. Im from Puerto Rico, and Im studying Computing Science. Im actually taking my first course of programming, and it is called "Introduction to computer programming", and we are programming with C++. At this point almost everything has been theory, but now we are starting with practice, and I … | |
Hello. Well, unlike C, C++ provides a concept of headers(not header files) and that these headers are something like a collection of names, which may mapped as header files by the compiler. Can anyone please correct me if im wrong in my above understanding. Also please state the main difference … | |
Hello. i needed a variable size bit string. And since bitset provides several operations, i wanted to use it. But is it possible to make it a variable size one? [CODE]class TryBits { private: string s; bitset<n> b; //now i need n = s.size(). };[/CODE] How can i achieve this? … | |
Hey everybody , I'am writing a very simple chat program (Client & Server) in C++ & QTNetwork libary. I Have a static cast problem that i don't understand , here is my code : PS.Lines with errors are commented : [CODE]#include "server.h" #include "ui_server.h" #include <QtNetwork/QTcpSocket> Server::Server(QWidget *parent) : QWidget(parent), … | |
so im writing some video/image editing software and im stumped... not about the code so much cuz what im doing works fine .. im not convinced it is the most efficient use of my computer but it works. first my code... [CODE] #include <iostream> #include <fstream> using namespace std; int … | |
Hi, I have to write an address book using structs for a class. I have 90% of the code done, but I am having trouble ordering it. It is supposed to read in 10 entries from a file and then sort them by last name. All the information also has … | |
hello all.., can i use c++ libraries and the compiler to create my own interface? i just want to use a different gui for it.. a new editor of sorts.if yes then how do i go by it? thanks.. | |
I'm implementing an application that should decide whether to move computations to external memory, depending on RAM memory consumption. Is there a C++ function that computes my maximal RAM memory capacity, and the amount of currently consumed portion (in MB, perhaps). Any other suggestions on how to obtain these values … | |
I'd like to know what the ASCII codes for the toggle keys of the keyboard. I want to make the mouse clicks do different thing when the Caps Lock, or Scroll Lock is pressed. Walt |
The End.