49,761 Topics
| |
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 … | |
[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"? | |
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, … | |
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 … | |
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 … | |
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> … | |
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? … | |
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 … | |
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. … | |
<<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. … | |
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(); … | |
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 … | |
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 … | |
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... … | |
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 == … | |
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 … | |
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. | |
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 … | |
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 … | |
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 | |
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 … | |
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", … | |
: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 … | |
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 … | |
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 … | |
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 … | |
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()' … | |
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 … | |
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 … |
The End.