49,761 Topics

Member Avatar for
Member Avatar for TheSecOrg
Member Avatar for medopunsher

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), …

Member Avatar for medopunsher
0
250
Member Avatar for therstonsplace

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 …

Member Avatar for NicAx64
0
105
Member Avatar for The Shadows

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 …

Member Avatar for bonethugs
1
410
Member Avatar for Redhaze46

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..

Member Avatar for NicAx64
0
129
Member Avatar for onako

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 …

Member Avatar for manojwali
0
293
Member Avatar for walter clark

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

Member Avatar for Ancient Dragon
0
105
Member Avatar for localp

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 …

0
47
Member Avatar for maceron

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 …

Member Avatar for maceron
0
210
Member Avatar for Michael_Grumbac

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 …

Member Avatar for Michael_Grumbac
0
250
Member Avatar for myd5258

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 …

Member Avatar for Lerner
0
424
Member Avatar for ftl25

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 …

Member Avatar for vijayan121
0
2K
Member Avatar for exekiel101

[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 ]; …

Member Avatar for Duki
0
76
Member Avatar for PixelExchange

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 …

Member Avatar for PixelExchange
0
142
Member Avatar for dineshcbe

[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(); …

Member Avatar for Narue
0
129
Member Avatar for Sismetic

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 …

Member Avatar for Stefano Mtangoo
0
1K
Member Avatar for fizzix66

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; } }; …

Member Avatar for Duki
0
141
Member Avatar for s-pika

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 …

Member Avatar for prvnkmr449
0
90
Member Avatar for exekiel101

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: …

Member Avatar for prvnkmr449
0
123
Member Avatar for cnmsg007

[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 …

Member Avatar for Software guy
0
164
Member Avatar for PixelExchange

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 …

Member Avatar for PixelExchange
0
296
Member Avatar for eniine

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

Member Avatar for Nick Evan
0
241
Member Avatar for exekiel101

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???

Member Avatar for VernonDozier
0
75
Member Avatar for AutoC

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 …

Member Avatar for embooglement
0
111
Member Avatar for hag++

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 …

Member Avatar for embooglement
0
169
Member Avatar for pleasecompile

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 …

Member Avatar for pleasecompile
0
445
Member Avatar for caribedude

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 …

Member Avatar for caribedude
0
281
Member Avatar for tron_thomas

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 …

Member Avatar for tron_thomas
0
590
Member Avatar for totalwar235

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 …

Member Avatar for Duki
1
155
Member Avatar for mommabear

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 …

Member Avatar for mommabear
0
106

The End.