49,757 Topics

Member Avatar for
Member Avatar for lovetwins01

Hi Everyone, I am taking C++ for the second time and I am understanding it better this time around. I have an assignment that needs a switch (got that, know how to do it), I have put if/else statements inside of the cases. The thing I can't get to work …

Member Avatar for krissybhabhie
0
2K
Member Avatar for yashikagg

I am using C++/Qt4.3.0.Here I am exporting an html report to .doc file containing some images that are created at run time.For that, I have used html and then inserted the html text to QString and then to QTextEdit..Now I want to make this .doc file system independent so the …

Member Avatar for yashikagg
0
716
Member Avatar for Labdabeta

I want to be able to make a program that emulates what a human at a computer can do. IE: I want to be able to read the visual information of a window (a 2d array of colour would be perfect) and be able to send virtual key syms and …

Member Avatar for Labdabeta
0
121
Member Avatar for suganesha

hii i am a beginner in c++ and i have got an assignment to do. below is my code and i am unable to execute it so can anyone help me out !! please !!! I am confused on how to replace the room no. in change_room() function and case …

Member Avatar for np complete
1
7K
Member Avatar for antoinette.boulevard

I've figured it out but I want to know HOW. When I do code I try and figure out the math behind it on the side so I know exactly what is going on. But this time has stumped me. I know what the code is suppose to be, so …

Member Avatar for pasx
0
3K
Member Avatar for Suzie999

Hi I'm hoping to get some starting points here in a subject that scares me, RegExp. I've looked at a couple of tutorials but they all seem to be based on std::string. I'd like to use std::tr1::regex but I don't know where to start or even if it's possible without …

Member Avatar for Suzie999
0
2K
Member Avatar for ysmtek

*Hello people of the DaniWebs! It's been a long time since I've been talking and asking here, under the name of **katmai539**. I've lost account information and also the email address linked to it. I haven't been active in the software development-branch for the past few years but recently I …

0
223
Member Avatar for Suzie999

I am getting results from a routine which are unexpected from me. here is athe code. void MyTestFunc(){ u_char MyTest_u_char[10] = {'a','b','c','d','e','f','g','h','i','j'}; u_char * MyTest_u_char2 = new u_char[8]; memcpy(MyTest_u_char2,&MyTest_u_char[1],sizeof(u_char)*8); int raw_len = sizeof(MyTest_u_char2) + 1; string std_str(MyTest_u_char2, MyTest_u_char2 + raw_len); cout << std_str << endl; // expecting bcdefghi . getting …

Member Avatar for deceptikon
0
136
Member Avatar for sss93

Ive just started going through and developing basic applications using the win32 API, and couple of times I have come across people mentioning that directly using win32 is not wise...I've just started using the library and personally think its nice and easy to use. However Ive been seeing things like …

Member Avatar for deceptikon
0
234
Member Avatar for ShEeRMiLiTaNt

Hello, I need to write a function that would take a string and break it up into tokens (ie words, numbers, and punctuation). First it needs to break up the string and store them into an array called Token[]. Obviously a for loop needs to written however should I just …

Member Avatar for ShEeRMiLiTaNt
0
128
Member Avatar for kshahnazari

HI , everyone can you please write a program for me , I have a set with 5 things in it thats line a={1,2,3,4,5} but it could be everything possible and there are subsets like b={1} c{1,2} d{1,2,4,5} but I cant write the progam so if you can write a …

Member Avatar for np complete
0
122
Member Avatar for phorce

Hey, I might be having a blonde moment but here goes.. I'm trying to split a massive 1D vector into blocks at different places (If that makes sense), it should basically go like this: 0 201 401 601 801 .. .. .., 57201 2 202 402 602 .. .. .. …

Member Avatar for L7Sqr
0
2K
Member Avatar for JanraeMendoza

//==============================================================================// // RPS (Rock Paper Scissors) // Author: SoulPour777 / Janrae Mendoza // A Simple C++ Game // =============================================================================// #include <iostream> #include <cstdlib> #include <ctime> using namespace std; string player; string player2; int wins; int loses; int roll; int draws; void error(); void gamePlay(); void Scene_Result_Display () { cout << …

Member Avatar for rubberman
0
518
Member Avatar for sss93

Hey so for a couple of months now Ive been facinated with c++ and have been going through various tutorials and examples of creating console based applications dealing with arrays,pointers, classes, etc.So I really want to get into the GUI side of it. But from word of mouth I hear …

Member Avatar for mike_2000_17
0
383
Member Avatar for bobejoe

can anyone give me a cool c++ program using alloc and free you can use c also

Member Avatar for bobejoe
0
107
Member Avatar for rajat.sethi93

#include<stdio.h> #include<conio.h> void main() { float a[5][5],x[3];float t,s; int i,j,k; printf("enter a matrix of order 3*4"); for(i=0;i<3;i++) { for(j=0;j<4;j++) { scanf("%f",&a[i][j]); } } for(i=0;i<3;i++) { for(j=0;j<4;j++) printf("%f ",a[i][j]); printf("\n"); } for(i=0;i<=1;i++) { for(j=i+1;j<=2;j++) { t=a[j][i]/a[i][i]; for(k=i;k<=3;k++) a[j][k]=a[j][k]-t*a[i][k]; } } printf("The upper triangular matrix is as\n"); for(i=0;i<3;i++) { for(j=0;j<4;j++) printf(" %f",a[i][j]); …

Member Avatar for rajat.sethi93
0
205
Member Avatar for dadon1991

Hello everyone first time posting here, I have spent hours trying to figure out how to write this program that our instructor has given to us as an assignment. http://en.m.wikipedia.org/wiki/Bogosort#section_3Instructions are bellow Frequently, the temperatures on the news are given in Centigrade rather than Fahrenheit. The formula for conversion is …

Member Avatar for dadon1991
0
236
Member Avatar for jeets1892

I am currently working on a dice game. Where The user rolls a pair of dice first, so lets say he rolled and Dice 1 = 2 and Dice 2 = 3. So the total is 5 now. Now, he needs to get 5 (total) again in order to win, …

Member Avatar for WaltP
0
453
Member Avatar for Alexkid

Hi There, I need to re-write any mention of .tellg() in my code as the function is not supported on the desired hardware. I have the following lines of code: getline(file,line); { std::istringstream stream(line); stream >> first >> second >> third >> forth; UINT32 file_pos = stream.tellg(); file_pos++; fifth = …

Member Avatar for vijayan121
0
743
Member Avatar for triumphost

I'm learning several languages. 5 at once but I took a liking to one specific feature of java. The This keyword. From their tutorial: /*Within an instance method or a constructor, this is a reference to the current object — the object whose method or constructor is being called. You …

Member Avatar for mike_2000_17
0
486
Member Avatar for nada_fateha

Hi , I try to build mobile application , this application will know the book name you want and tell you price and Customer Reviews evaluation from amzon.com but the problem I can not read web page to get price and Customer Reviews evaluation from it by c++ code , …

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

I'm trying to understand something. Best explained through an example. My understanding is that a Class Adapter (lets say written in C++) is for a class written in PHP (hypothetical). C++ - Class A - Adapter PHP - Class B - Adabtee. If I'm trying to access Class B through …

Member Avatar for daino
0
206
Member Avatar for lscamaro

Okay, I want to start off saying that yes this is a homework assignment but no I don't just want the answer for it. I actually want to learn how to work this. Having said that, I was assigned to determine whether a number is a perfect number and print …

Member Avatar for np complete
0
268
Member Avatar for triumphost

Is there a way to do the following better? Current I write a set of pixels to a file called "PngFile.bmp". Then I read that file back in as a PNG encoded buffer.. Then I save that buffer back to the harddisk and delete "PngFile.bmp" /*std::fstream PngFile(TempPath, std::fstream::out | std::fstream::app …

Member Avatar for triumphost
0
2K
Member Avatar for yehernpoh

Hi! I am using concert tech to link Cplex with C++ Coding. There is an error that pop up when I tried to run: error C2676: binary '+=' : 'IloNumVar' does not define this operator or a conversion to a type acceptable to the predefined operator Below is a portion …

Member Avatar for WaltP
0
172
Member Avatar for gerard4143

Does anyone know how to do this? I attached a program that collects all the command line arguments into a map container noting how many times each command line argument occurs. Now I want to sort this map of information by loading a vector with iterators that point to each …

Member Avatar for vijayan121
0
519
Member Avatar for compgeek22

Hello. I am trying to run a simple postfix notation code. It builds but doesn't run. Can anyone tell me if it's my code that is stopping it from running? Here is my code: `int main(int argc, char *argv[]){` char *a = argv[1]; int i, div, N = strlen(a); stack<int> …

Member Avatar for np complete
0
238
Member Avatar for jeaninem71

I am a newbie so please forgive my ignorance. I need help with this program, it is outputting 1s for the functions. I know it's something simple, but like I said I am new and don't know what to do. #include <iostream> #include <cctype> #include <string> #include <iomanip> #include <cmath> …

Member Avatar for np complete
0
272
Member Avatar for jeaninem71

Here is a second one I am stuck on. This one is working correctly, but I didn't know how to go about doing a function for the output of line 9 so that put me into problem of not being able to figure out how to get line 10 to …

Member Avatar for np complete
0
220
Member Avatar for jeets1892

Hello, Please take a look at the below code - #include<iostream> #include<ctime> // for the time() function #include<cstdlib> // for the srand() and rand() functions using namespace std; int compInput; int userInput; int die1 = 0; int die2 = 0; int Dice () { // set the seed srand(time(0)); // …

Member Avatar for jeets1892
0
2K

The End.