49,766 Topics

Member Avatar for
Member Avatar for ontrix

Hi there im wondering how to use a time delay in my code. What i have done is searched through a saved file and picked out infomation the send it to the rs232 port. what i want to do is create a time delay of 100 micro seconds for every …

Member Avatar for Ancient Dragon
0
398
Member Avatar for gampalu

I'm programming in C++ and I've been told that "printf" is faster than "cout", so since then I've been using "printf" instead of "cout". Do you recommend my option or not? thanks

Member Avatar for Dave Sinkula
0
130
Member Avatar for Joncamp

I wrote a cgi-bin program to run with Apache/Linux. When I do a form-post operation from a web page to my cgi-bin program, the form fields are not passed to the cgi-bin program? The cgi-bin program runs ok and returns some html through stdout, but doesn't read any form fields …

Member Avatar for Dave Sinkula
0
162
Member Avatar for jazzz

I need to sort a list of numbers Here is the sample input: code -> subcode -> brandcode ( each code has a subcode and each subcode has a brandcode) [code] 7366->65535->65535 7379->65535->65535 7379->65535->65535 7379->65535->65535 7366->65535->65535 7366->65535->65535 7379->65535->65535 7366->65535->65535 9113->65535->65535 7379->65535->65535 7315->5->65535 7314->65535->65535 7315->5->65535 7314->65535->65535 7379->65535->65535 7314->65535->65535 7314->65535->65535 7314->65535->65535 7311->65535->8 …

Member Avatar for iamthwee
0
2K
Member Avatar for nanodano

Hey everyone, I'm trying to write a simple program that can do more than one thing at once. I'm not an expert on the iostreams, so I don't know if I need to create threads to accomplish what I want. What I'm trying to do is run a loop while …

Member Avatar for dubeyprateek
0
114
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
225
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
259
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
302
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
173
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
239
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
117
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
131
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
264
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
75
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
822
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
269
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
298
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
117
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
161
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
147
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
252
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
211
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
362

The End.