49,761 Topics
| |
| |
I can't seem to find any function which will allow me to obtain the Windows screen resolution and/or set it in C++. I would like to be able to change it, then change it back. Thanx | |
Q1: design a system that will read students information, display them in a table form, and implement some operation on them. The system must show the following: ========================================================================= Do you want to add new students? Do you want to display the student information? Calculate the average of the final marks … | |
Write a program that prompts the user for an odd positive integer, n, greater than 1, and then prints the following hourglass figure which has a height of n text lines: In this example: n = 9 ********* (please refer to the attachment for the figure) * * * * … | |
My instructor wants us to create a program that relates to some event we have recently gone through and I need help to get the rest of the code to work. Scenario I passed by the instructor is : I just got a car which my grandfather paid in advance … | |
can anyone teach me how to set the size of console window? | |
Hi guys, i try to write my data into a binary file, but j have some problem in it . I dont know what happening inside.. [CODE] //////////////////////Here is my code///////////////////////////// class Person{ char Name[50]; char Address[10; bool sex; short age; public: Person(); Person(char* name, char *address, bool sex, short … | |
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? … |
The End.