49,761 Topics

Member Avatar for
Member Avatar for achala

hello, am doing a project for school . it involves a lot of file and string operations and i keep compiling the code over and over again to see if it is working properly ... all of a sudden the code simple stopped executing .. the code ran a number …

Member Avatar for Ancient Dragon
0
224
Member Avatar for CStallion

[code] int r = rand()%2; switch(r) { case 0: string x[] = "Hi."; break; case 1: string x[] = "Bye."; break; } [/code] Will this code produce a conflict on the string "x"?

Member Avatar for CStallion
0
94
Member Avatar for MrLew

I am trying to write a program to convert a roman numeral to decimal. If I define a variable with: [inlinecode]char roman_num[15];[/inlinecode] can I then select individual characters in that roman numeral with: [inlinecode]roman=roman_num[i];[/inlinecode] where "i" is a number value of the character I want to retrieve from 0-14? Also, …

Member Avatar for Dave Sinkula
0
251
Member Avatar for CStallion

I know how to change the console text color using this code [code]HANDLE hConsole; hConsole = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hConsole, ###)[/code] But suppose I need to change colors frequently and on different output lines. Is there a shorter way to do it, like [code] cout[color=red] << "text"; [/code] ??? Rant: Google searching …

Member Avatar for CStallion
0
295
Member Avatar for aeinstein

Hi all, I'm transistioning from the networking end of things and moving to the programming side, so, even though I've been around here for quite awhile, I have a pretty basic queston: since the char data type has a minimum range values between -127 to 128, how is a letter …

Member Avatar for aeinstein
0
169
Member Avatar for Kiba Ookami

I was on Cplusplus tonight, learning a bit about data structures (which I like). Well, I copied and pasted one example, ran it, learned a bit. Then I tried the same for the second. Here's the code for the second... [code]// array of structures #include <iostream> #include <string> #include <sstream> …

Member Avatar for WolfPack
0
235
Member Avatar for jamezun

Hello! eveyone! I am new in here! But I got some urgent problem need to be solved shortly! please help me! I am designing a simple GUI card game by VC++.NET My game isnt complicated. However, I want to add some sound effect like maybe when I click a button? …

Member Avatar for jamezun
0
148
Member Avatar for Malcolm87
Member Avatar for ifti
0
116
Member Avatar for bkelly

I have "discovered" a need to do some development for an embedded system. We have a PC-104 computer that boots MS-DOS 6. It does have VGA display and regular keyboard input. I need to develop some code to drive a digital I/O board. I can do this is C or …

Member Avatar for bkelly
0
130
Member Avatar for Aenima

First of all, hello everyone. My problem is this. In writing a program which accepts multiple user inputs of type [B]int, [/B]during the first run through the program, after the first [B]cout << [/B]statement prints, I have to press enter twice in order for the second [B]cout [/B]statement to display. …

Member Avatar for Aenima
0
261
Member Avatar for sufi

<<split from: [thread]42172[/thread]>> [QUOTE=weehoong]Hi there guys! Just want to say these communities are great! i've really benefited alot from the forum and its tutorials. Special thanks to [B]FireNet [/B] and his file handling tutorials. It really helped me alot! Not forgetting, thanks alot to all of the members here too. …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for gladiator1919

HI members; This is a memory game with c++ concole application. This is the code: [CODE]#include<iostream.h> //MEMORY GAME. #include <algorithm> //DESIGNED BY GLADIATOR1919. #include<ctype.h> //GLADIATOR1919@GMAIL.COM. #include<time.h> //ALL RIGHTS RESERVED. #include<windows.h> int e,i,j,q,m,n,x=0,row_1,column_1,row_2,column_2,score=0; char rand_1[16]={'a','g','h','j','k','a','s','d','f','g','s','d','f','h','j','k'}; struct mem_char { char ch[5][5]; }; char re_play; mem_char char_1[2]; void end_game(); void input_first_point(); void input_second_point(); …

Member Avatar for SpS
0
3K
Member Avatar for bibo1978

I want to write a c++ code that generates a DLL, the purpose of the exported Function is to do some processing on data on the memory, the main problem here is that I want my code to return also a memory pointer, yet I don't know exactly how to …

Member Avatar for Ancient Dragon
0
74
Member Avatar for nanodano

Hey, I have a problem using Visual Studio 2005. In the MSDN library it says there is a function called SetConsoleDisplayMode. This function though is not in the 2005 library. I'm assuming its an old reference from VS 2003. Does anyone know how to tell a console program to switch …

Member Avatar for SpS
0
804
Member Avatar for newgurl

Hello, Can you please assist, why my Dev C++ program, wont see that I am trying to introduce the string library? Eaxmple: [code]#include <iostream> #include <string.h> using namespace std; ... ... ... int id; string name; int item; float cost;[/code] int is bold, float is bold, but string is not... …

Member Avatar for WaltP
0
263
Member Avatar for tyczj

i dont even know if im on the right track with this one but here it goes. im trying to write a delete function for a BST and this is what i have [CODE]bool BST::delNode(Key key) { BST_Node* node; BST_Node* p; if(findKey(key,root)) { if(root == NULL) return false; if(key == …

Member Avatar for iamthwee
0
297
Member Avatar for newgurl

Hello, I am new at this. I am trying to work with calling functions here. (Eventually I want to do some simple calcs on cost of going through a station...)but am getting an error on line marked with ***** initialise line within main int(). Can someone kindly suggest why it …

Member Avatar for WaltP
0
3K
Member Avatar for complete

This is a little embarassing asking this because I used to know this. How do you create a seperate thread in C++ and have mutexes, semiphores and all that. I have forgotten and I wonder if anyone knows a good example.

Member Avatar for complete
0
113
Member Avatar for deepakkrmehta

hello all group members plz explain me topic in c++ this topic from exception handling 1. constructor,destructor and exception handling. 2. exception and inheritence 3.and also clarify me idea abt proxy class with example because i m 1onfuse with composite class these classes seems to be same 4.container class and …

Member Avatar for Dave Sinkula
0
165
Member Avatar for rontab68

Hi, lets say I have an array of numbers then I want to display a certain array element. the value inside it,that is. in pseudo code that would be.. int array[5][5]; for(x=0;x<6;x++) { if x= array[0][1]; } ; ; ; message output " the value is array[0][1]" I want to …

Member Avatar for rontab68
0
159
Member Avatar for ghadahelal

hi all, i have a program that read a float number, but with in the program i need 2 deal with the integer only ex. 33.78 i need 2 deal with 33 45,01 ----> 45 66.99----->66 and so on

Member Avatar for ghadahelal
0
146
Member Avatar for CStallion

I need to insert a "é" and other such symbols. At first I just tried using é straight out in C++ and it returned Θ. So I looked at my character map and did the unicode version \u00E9 where I wanted the é and it still returned Θ. I guess …

Member Avatar for Ancient Dragon
0
3K
Member Avatar for CStallion

I apologize, the topic of this thread has nothing to do because this post was started about a parse/syntax error but I solved it on my own and now this is something else, hopefully simple! I have this function that goes like this [code] void er(void) { string erbase[] ={"parl", …

Member Avatar for Dave Sinkula
0
249
Member Avatar for pab

:sad: :sad: :sad: :sad: :sad: :sad: :sad: :sad: :sad: :sad: :sad: :sad: :sad: HiI HAVE TWO PROBLEMS!!!!!!!!!!!!!!!!!!!!! The first problem occurs when I run a virus scan. I contacted EZ ANTI VIRUS and the company said that this problem is a MICROSOFT problem because I ran a scan in the …

Member Avatar for Chaky
0
205
Member Avatar for wwaall2004

hi every one iam new member in your sites and i hope i will find what iam looking for:rolleyes: so my friends i really want ur help iam students in univerisity 3rd level and our teacher ask us to write program in c++ this one below { [COLOR=#000000]Develop an [B]Airline …

Member Avatar for wwaall2004
0
350
Member Avatar for GM2001

I need some help with a program concerning files. a)I have to create a file with the following information: 1. Honda 4000 2.Toyota 3000 3.Mercedes 8000 4. Toyota 3500 5. Honda 2900 create the necessary data structure to represent the above data in a program. create the necessary variables and …

Member Avatar for Dave Sinkula
0
91
Member Avatar for letish

Hello All, I am hoping someone can help. I am working on a project that requires me to create a telephone VDU system. I have done all the hard stuff but it's just some of the easier bits that are evading me like... a) The user must press "enter" to …

Member Avatar for Lerner
0
495
Member Avatar for freemind

Hi to all! I'm writing a simple simulation program for elevators but i get a problem, namely: [CODE] elevator.cpp: In constructor `Elevator::Elevator(int)': elevator.cpp:41: error: no matching function for call to `Button::Button()' elevator.cpp:10: note: candidates are: Button::Button(const Button&) elevator.cpp:16: note: Button::Button(int, bool) elevator.cpp:41: error: no matching function for call to `Button::Button()' …

Member Avatar for freemind
0
392
Member Avatar for Kiba Ookami

There is only so much I can learn from free online sites (though I have learned some important things) and was wondering what books you would reccomend to further my C++ study? Additionally, I've heard bad things about my compiler, Bloodshead DevC++, in that it would be abandoned or is …

Member Avatar for vegaseat
0
136
Member Avatar for Analogsleeper

Hi all, hoping someone can help me with a bit of code problem. I have this simple C++ program that does some processing on a text file with a bunch of numbers in it. I'm reading the numbers into global structures and then doing some math, then overriting those global …

Member Avatar for Analogsleeper
0
214

The End.