51,593 Topics

Member Avatar for
Member Avatar for tkud

Hi everyone , I have an edit control and 2 APIs for saving text from and loading text to the edit respectively. However, when I load text, instead of giving out the exact alphabets in the text, it gives chinese!! Please, I need help to tackle this problem,any psitive help …

Member Avatar for Frederick2
0
921
Member Avatar for DTV

I'm trying to make a 50x50 board of 50 pixel by 50 pixel squares. However, when I run this code, it only gives me one square. Does anyone have any idea what I'm doing wrong? [CODE] #include <iostream> #include <allegro.h> using namespace std; int xgen = 0; int ygen = …

Member Avatar for DTV
0
114
Member Avatar for eduard77

Why do I have a syntax error in this line ? I think that everything is correct fMaxElem = fabs(double pfMatr[k*nDim + k] , int k); // error C2059: syntax error : ')' m = k; for(i=k+1; i<nDim; i++) { if(fMaxElem < fabs( double pfMatr[i*nDim + k], int k) )//error …

Member Avatar for VernonDozier
0
60
Member Avatar for eduard77

Can anyone tell me what to do to solve this error? [CODE]#include <iostream> #define MATRIX_DIMENSION 4 int WSACleanup (void); int main(int nArgs, char** pArgs) { int nDim = MATRIX_DIMENSION; double fMatr[MATRIX_DIMENSION*MATRIX_DIMENSION] = { 1.0, 2.0, -1.0, -2.0, 1.0, 3.0, -1.0, -2.0, 2.0, 1.0, 1.0, 1.0, 3.0, 1.0, 2.0, 1.0, }; …

Member Avatar for eduard77
0
80
Member Avatar for esmeco

Hello! I'm having some problems with constructor initialization,mainly because I have object members and vectors within classes. I have a class Factory in which i have 2 object members(base and dumpster),a vector of Floors and a set of Robots. Each Floor has a size(lin,col) and a member object Cell which …

Member Avatar for Agni
0
110
Member Avatar for hussamo

[CODE]#include <iostream> #include<string> using namespace std; long int NN; int x=0; class node *temp, *temp2 ,*start; class linked_list { public: class node { public: char name[20]; long int national_number; char residance[25]; node *nxt; }; //---------------------------------> linked_list() { node *start; start=new node; cout<<"NAME : Hussam Adel Abu Lubbad"<<endl; cout<<"nathiona number : …

Member Avatar for Ancient Dragon
-1
115
Member Avatar for Excizted

Hi everyone... I have a silly problem.. Somehow I managed to faceroll or something, hitting a shortcut which shows all indents as arrows and all spaces as dots. Here is a picture of the problem: [url]http://img97.imageshack.us/img97/8789/problemyf.jpg[/url] I've looked the options through, but since I don't know what this thing I …

Member Avatar for Excizted
0
88
Member Avatar for yup790
Member Avatar for William Hemsworth
-2
80
Member Avatar for hattisaeed

[code]#include<iostream.h> #include<string.h> struct node { node*next; int data; }; class stack { private:node*top;node*top2;char c; public: stack() { top=NULL; top2=NULL; } void push(char c) { if(top==NULL) { top=new node; top->data=c; top->next=NULL; } else { node*temp=top; temp->data=c; temp->next=top; top=temp; } } void pop() { node*temp=top; char x=temp->data; cout<<x; top=top->next; delete temp; } …

Member Avatar for jonsca
0
90
Member Avatar for shishio1014

i would like to ask for help regarding my problem, it's like this... I have a txt file and inside it looks like this OL001 bob red 13 OL002 jack blue 13 OL003 paul yellow 14 so if my program starts it will ask for the OLXXX and return each …

Member Avatar for jonsca
0
137
Member Avatar for samsons17

What does this cin.clear() and cin.ignore() means? this is the part of the code : [CODE] while(1) { cout<<"Enter the Product ID :"; cin>>product[i].id; cout<<endl; if(cin.fail()) { cout << "\t\t\t\t\WRONG ID DATA!" << endl; cin.clear(); //what does it means?? cin.ignore(1000, '\n'); //why 1000?? continue; } break; } [/CODE] thank you …

Member Avatar for jonsca
0
394
Member Avatar for BobFX

Hi, I'm using a Form generated application. Its definition starts with: [code]public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) {[/code] When I'm inside one of its method, I can use calls like: [code]this->StartPosition = FormStartPosition::Manual;[/code] thanks to the this pointer. How can I do this kind of calls …

Member Avatar for BobFX
0
124
Member Avatar for monkey_king

Hi I've found a strange problem on ubuntu64bit, that limits the data you are allowed to allocate on a 64bit platform using the c function 'read()' The following program wont allow to allocate more that 2.1gig memory. [CODE=c++] #include <stdio.h> #include <stdlib.h> #include <err.h> #include <fcntl.h> #include <sysexits.h> #include <unistd.h> …

Member Avatar for monkey_king
0
145
Member Avatar for pink24_ann07
Member Avatar for jonsca
-4
122
Member Avatar for kizzer

can you please do me a c++ program that convert bi to dec and so on

Member Avatar for Ancient Dragon
-6
92
Member Avatar for LemonLemon

I am a beginner of c++ I just built a very simple Hello World program but nothing output to the screen what's the problem? Thanks in advance. Here is output message: 'HelloWorld.exe': Loaded 'D:\Visual Studio 2005\Projects\HelloWorld\debug\HelloWorld.exe', Symbols loaded. 'HelloWorld.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded. 'HelloWorld.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded. …

Member Avatar for restrictment
0
148
Member Avatar for Carrots

Hi, I'm trying to construct my first Doubly Linked List, but am having trouble compiling. This is my program: [B]main.cpp :[/B] [code=c++] #include <iostream> #include "node.h" #include "doublylinkedlist.h" using namespace std; int main() { system ("PAUSE"); return 0; } [/code] [B]node.h :[/B] [code=c++] class Node { public: Node *pointertonextnode;//pointer to …

Member Avatar for jonsca
0
357
Member Avatar for CppBuilder2006

when I right click a file ( with .ghh extension) a menu appears in Windows. How can I add a tab to it? when I select the tab my program runs & processes the file. (API programming)

Member Avatar for William Hemsworth
0
69
Member Avatar for Amonod

Hello. I am currently reading c++ primer plus 5th edition and I've become stuck at Chapter 13, Exercise 1, which is on class inheritance. The classes looks like this: [CODE] class Cd { ..... public: ... virtual void Report() const; .... }; class Classic : public Cd { .... public: …

0
76
Member Avatar for new programer

hello all, I've posted an old version of the following code before but I was not clear on my question or the title of the problem [for that am sorry] I did changes on the code now I have no errors but it does not do what I want .. …

Member Avatar for new programer
0
103
Member Avatar for ayesha91

Hey everyone,,, I am new to c++ and to reading from files especially... I wrote a code where I am filling an array of strings with strings from a file and there is an error that happen during the run of the program, please have a look at the reading …

Member Avatar for GrubSchumi
-3
141
Member Avatar for CrazyProgrammer

Hi, Could somebody please show me and example of how to iterate through an n-nary tree, where I do not know what n is and n could be different for every node ie the root node could have 3 children and each child might only have 2 children etc, I …

Member Avatar for john.double
0
224
Member Avatar for maiar

Hi how are you i needyour help pleasE i wanted to do this programme with C++ languge by visual C++ Hotel Reservation System – HRS In this project you have to design and implement an HRS that can be used by a small hotel. Your program should provide the following …

Member Avatar for tkud
-4
291
Member Avatar for timtianchen

[CODE]int main(){ string array[][]=get_element(2,3); return 0; } string get_element(int numrow,int numcol){ string result_array[numrow][numcol]; for (int i=0;i<numrow;i++) { for (int j=0;j<numcol;j++) { result_array[i][j]=" "; } } return result_array; //ERROR is on this line } [/CODE] I get error: conversion from ‘std::string (*)[(((long unsigned int)(((long int)numcol) + -0x00000000000000001)) + 1)]’ to non-scalar …

Member Avatar for monkey_king
0
148
Member Avatar for timtianchen
Member Avatar for joshbeebe

How do you take input from a user and use that input to determine what information in a class to use. Here's an example that doesn't work, but hopefully you understand what I am trying to do from this. [CODE] class hello { string name; int size; }; int main() …

Member Avatar for Bench
0
302
Member Avatar for Sumer7720
Member Avatar for Sumer7720
-3
37
Member Avatar for marirs07

hi,I'm currently working on a program in C++.I have a string for ex "Hello Hai How are you" When i print it using outtext im not able to get the output same as that of the string, the new line character"\n" is replaced by some other special charecter,and is printed …

Member Avatar for Lerner
0
318
Member Avatar for Laxman_Cit

Is there any method to find what is the error while Executing System() function?

Member Avatar for thelamb
-2
96
Member Avatar for chuong3a

Help me to use nested LinkedList for expressing Matrix. Thanks. Where is error in my code? [CODE]#include <stdio.h> #include <stdlib.h> #include <time.h> struct Node { int Data; struct Node *Next; }; struct LinkedList { Node *Head; Node *Tail; struct LinkedList *Next1; }; struct LinkedList1 { LinkedList *Head1; LinkedList *Tail1; int …

Member Avatar for Lerner
0
94
Member Avatar for dsakhare

Hi Guys I Need A Program Code Of Hospital Management For My mini-Project (Need Diploma Level Code :D) I hope That u guys will help

Member Avatar for DTV
-3
174
Member Avatar for new programer

hello all.. I have been working on a code to deal with cryptex .. please take a look at it and tell me what am doing wrong if you may.. here's the code: [CODE]//This program takes the number of rings, the unlocking word and the secret word in the form …

Member Avatar for Agni
0
156
Member Avatar for Jibran_

Hi! I am a student doing bachelors in Computer Science & IT. (2nd year) Please, can you people give me some decent ideas for my software project this year in C++? Last year, I built a small typing tutor (6800 lines of code) in C. I want to do something …

Member Avatar for Jibran_
-1
169
Member Avatar for NativeCode

I seem to be getting an error in this code gdb tells me the segerror is comming from the code: data[dpos]+=cmd[d]; [CODE]//Strip tags data[0]="";data[1]="";data[2]="";data[3]=""; dpos=0; for(int d=0;d<cmd.size();d++){ if(cmd[d]==';'){ dpos++; } else{ data[dpos]+=cmd[d]; } } cmd=""; //end strip[/CODE] Could anyone please tell me whats going on?

Member Avatar for NativeCode
0
131
Member Avatar for dre1234

Hi, I've just installed GraphicsMagick-1.3.7 under MinGW on Windows Vista OS. I'm trying to compile an exemplary piece of code included in the documentation using the C++ API (Magick++). [code=c++] #include <string> #include <iostream> #include <Magick++.h> using namespace std; using namespace Magick; int main(int /*argc*/,char **/*argv*/) { try { // …

0
68
Member Avatar for zinia

how do i make a very very simple game using c++?? pls i need the syntax.

Member Avatar for Dany_08
-1
82
Member Avatar for BobFX

Hi, I need to convert some C# code into C++. It starts with: [code=c#] Dictionary<string, ListViewItem> mItems = new Dictionary<string, ListViewItem>(); [/code] I can't find a full example in the C++ Visual Studio documentation. How do I declare a Dictionary object? A small example would be appreciated. Thanks.

Member Avatar for BobFX
0
1K
Member Avatar for marirs07

i've done a c program which involves creating and updating of files,i'd like to run my exe online,and moreover i want my files to be updated automatically after i work on that exe ,is there any way to do this.Plz Reply Soon.Thanks in advance.....

Member Avatar for restrictment
-2
76
Member Avatar for foxmulder

Hi all! Merry Christmas in advance! My question is "easy", I am looking for a "finished game" that I can revise. The game must be text-based and in C++. The game description is the following: A bow must be set in both angle and force to hit a balloon in …

Member Avatar for restrictment
0
88
Member Avatar for Darth Vader

I have a mathematical problem that I am not sure how to solve. I am trying now but still cant find a solution. What I is doing is this: The example is that I have a number: "129" that I will need to round down to the nearest value. The …

Member Avatar for Darth Vader
0
333
Member Avatar for arshad115

i have so many functions in my program,what i want to do is, i want to return back to the main() but in somewhere middle of it!. should i use goto statements? i tried 'em,it gave some error! if i should use goto then please explain how to,thanks

Member Avatar for Cokaric
0
6K
Member Avatar for tkud

Hey everyone, since nobody has decided to assist me in my problems, I guess I have to throw it at you guys this way: I am using Visual C++ 2008 Express edition, I have a win32 tutorial that I'm using, and I'm saving my files as .cpp. However, the codes …

Member Avatar for Frederick2
0
314
Member Avatar for qwertymk

I have the following code and was wondering if it is a memory leak [CODE] #include <cstdlib> #include <iostream> #include <iomanip> #include <vector> using namespace std; template <class T> class live { vector<T> _data; live<T> *_next, *_temp; public: live(int elements, int chunk = 10) : _next(NULL) { if (elements > …

Member Avatar for Agni
0
110
Member Avatar for bhas_purk

Hi guys, Merry Christmas. I created a program to delete duplicate songs from my computer. It is working nicely and for it to be really helpful I want to package it somehow so that I can give the software to my friends for use. Now I know giving just the …

Member Avatar for Ancient Dragon
0
125
Member Avatar for muska

Hi, i got the same problem with installing allegro to dev-cpp. i've already reinstalled but it's stil the same: "No such file or directory" or "undefined reference for install allegro version check". Sorry, i'm absolute newbie, can anyone help me? thanks

Member Avatar for DTV
0
638
Member Avatar for Galf

Hi all, I'm a little wary of posting this, since there were no posts on autoexp.dat, and this is a general C++ forum, but I thought I'd give it a shot. I'm trying to create an AddIn to display some custom datatypes for an application that uses RogueWave. I created …

0
59
Member Avatar for elspork

I'm having a bit of trouble finding the info I need about copy constructors. Actually, I'm having a bit of trouble figuring out the right way to use them in the first place. My question: How do I correctly call copy constructors for a derived class so that it correctly …

Member Avatar for barfoo
-1
1K
Member Avatar for charlize

I'm very new to C++ and I keep getting a parse error for the bolded line below. I'm not understand why this is. #include<iostream> using namespace std; int main() { int a; cout<<"\nPlease make me easier to read..."; a=2+2 [B]cout<<"\nLook what I can do:2+2" <<a;[/B] cout<<"\nIcan do more, but only …

Member Avatar for crobicha
0
120
Member Avatar for rsaska

There is a script that I have been tasked to run and modify. However, I am having quite difficulty in understanding the signifigance of return codes, and it would make my life easier if I can redirect the system console output to file. In Windows, I tried going to run, …

Member Avatar for mitrmkar
0
202
Member Avatar for MyRedz

hello guys...i just done my assignment and here's the code [code] #include <iostream> using namespace std; class CelestialBody { private: double size; public: CelestialBody (double ); ; class Planet : public CelestialBody { private: double orbit_time; public: Planet(double , double); }; Class Earth : public Planet { private: unsigned long …

Member Avatar for JugglerDrummer
0
154

The End.