49,761 Topics
| |
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 | |
I need to write a C++ code, where if theres a String called "hello" in the code each character should appear (character by character) on the mouse focus. That means where ever i click my mouse (Even on an external program), and when the on focus sign appears the characters … | |
Just a quick question, if string::npos represents the largest possible value for a string object, how can this value be -1 if it's an unsigned integer? I know this value will change for different compilers, as string::npos on my compiler is set to 4,294,967,295 which makes sense but I don't … | |
I need to take a class on using C++ Libraries. Something that's about 3 months in duration, with some sort of a test at the end. I could easily just go to google and start there, but I was afraid that I would just get a zillion classes, without any … | |
Can some1 giv me some clues to cont the deal card to players part ??? The program will deal cards once the user enter the numbers of player between 3-7, either five cards per player or seven cards per player depending upon the menu selection, to the players at the … | |
Hi. Is is possible to create a lookup table of function pointers to functions with variable numbers/types of arguments? If not, can anyone recommend a solution for my problem? I have a list of commands corresponding to functions with variable types/numbers of arguments. Some don't take any arguments. I was … | |
[CODE] #include <iostream> #include <iomanip> using namespace std; int main() { int rows; cout<< "put the number of rows here"" "; cin >> rows; cout<< "numbers here""\n "; int *arr = new int[ rows ]; for( int i = 0; i < rows; i++ ){ cin >> arr[ i ]; … | |
I've already tried rendering text using the "CreateFont()" function, however, I am unable to achieve "clear" text. My text always looks.. blurry. I would like to achieve clear results as the results of Macromedia Flash's "Bitmap text" option, or even its "Anti-Alias for readability." Also, does anyone know how I … | |
[COLOR="Red"]I have a problem when i am writing a content into a files as a binary format.I noticed, that it writes the content two times into the file. Here is the code.[/COLOR] [CODE] #include<iostream> #include<string> #include<fstream> using namespace std; class store { protected: char pass[50]; public: fstream file; store(); ~store(); … | |
Hi, thanks for choosing to help me. I want to do a simple music player, you know, the slider with the seconds you're on, play/pause, stop, open file, show recent files,about and exit. I tried QT's Phonon, but it isn't working, I get a lot of errors trying to compile … | |
see comments. set me straight. many, many thanks... [code=c] 3 questions about inheritance, pointers, & polymorphism #include <iostream> using namespace std; class baseClass { public: void nVirt() { cout << "not virtual, base " << endl; } virtual void yVirt() { cout << "virtual, base " << endl; } }; … | |
i've this code, and when i run it, it produce garbage how to solve it???? [CODE]#include <stdio.h> #include <string.h> #include <stdbool.h> // using bool data type void function (void); char encode(char); char decode(char); void changeSecretCode(char, char); char code[27] ={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'}; char secretCode[27] = {'Z','Y','X','W','V','U','T','S','R','Q','P','O','N','M','L','K','J','I','H','G','F','E','D','C','B','A'}; int main () { function(); system("pause"); return … | |
uhm sir... the program must be like this... ..awwwhelp me plsss the rows and columns must input numbers manually ...and the result will be like multiplication table... the outcome must be like this: number of rows?: 5 number of columns: 6 input rows: 2 3 5 1 0 input columns: … | |
[CODE]#include<iostream> #include<string> #define MAXnominees 3 using namespace std; class MemberData { protected: int ID ; char Name[20]; char Add[20] ; char Tel[15] ; public: void enterData(); void showData(void); }; void MemberData::enterData() //allow user enter member's particular { cout << "Please enter your Membership number: " << endl; cin >>ID; cout … | |
Hi everyone. I already know how to create a program using just one window.. but I'm having trouble creating a program with 2 windows. I used CreateWindow() to create my second window, however, my second window displays exactly what is on my main window! I figured the reason was because … | |
How can i display unique number in a matrice . For example the matrice : 16483 23870 14509 26901 And this display : Nr: 0 -> 3 1 -> 3 2 -> 2 3 -> 2 4 -> 2 5 -> 1 6 -> 1 ......... . Plesae helo me | |
i cannot get the logic of this thing... i will input the number of rows example "rows=5" then "input the numbers = 2 3 8 9 7" what codes could i use??? | |
Hi, Here's my scenario. I am given records and the datastructure of each column in the records at runtime. A sample looks like this, [code] char[] | int16 | int32 | double abcd | 2 | 96 | 1024 ghi | 3 | 104 | 2048 [/code] I cannot predefine … | |
Hi All, I have been programming for a while, currently a junior CS student. Programming has always felt very natural to me and I pick up new concepts quickly and I generally retain most of what I learn. However, when it comes to converting between Dec/Bin/Hex as well as performing … | |
Hello, can someone please assist with my application... An automation system collects 512 measurement points per sensor. Each measurement point has dedicated OPC tag which I can read using OpenOPC for Python. However, with multiple sensors, the OPC server can lag. So, the automation system programmer created an "array of … | |
Hi, I'm having some problems with this bit of code. I need to randomly open some files that have numbers as their filenames. i came up with this snippet to be able to open them from numbers 0 to 99. The code should randomly pick a number and try to … | |
I have a situation whereby I need to copy the contents of an STL vector into a memory buffer provided by the system. One might think that given: [CODE]std::vector<ObjectType> source; // Initalized to hold the objects ObjectType* target = reinterpret_cast<ObjectType*>(buffer); // Points to system provided memory buffer[/CODE] someone could do … | |
this questions may be vague, but how many functions can you open up through function calls without ending the function. and example would be... [CODE] int FunctionOne(); int FunctionTwo(); int FunctionThree(); int FunctionFour(); int FunctionFive(); int main() { FunctionOne(); return 0; } int FunctionOne() { FunctionTwo; return 0; } int … | |
Hello again. For the current lab, we're working with strings and pointers. I'm trying to keep this one simple and get one step working right before I move on to the next. However, if I have subsequent issues with this lab, I'll just use this same thread rather and make … |
The End.