49,766 Topics

Member Avatar for
Member Avatar for udtohan_noriel

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 …

Member Avatar for Duki
0
317
Member Avatar for mrrko

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 …

Member Avatar for Fbody
0
750
Member Avatar for myk45

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 …

Member Avatar for Fbody
0
173
Member Avatar for ganesh_IT
0
54
Member Avatar for myk45

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

Member Avatar for myk45
0
3K
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
251
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
106
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
415
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
131
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
295
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
106
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
213
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
251
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
428
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
144
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
130
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
143
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
91
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
124
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
165
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
317
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
242
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
76
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
113
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
171

The End.