49,761 Topics

Member Avatar for
Member Avatar for AkashL
Member Avatar for Anyzen

Hello.. Supposing that i have this code..i want it to end after a character is pressed..but i dont know what to add...i can end it if input is negative or zero..but not char..i tried some experiments but it will end up debug assertion fail..help would be great.. [CODE] // adds …

Member Avatar for Anyzen
0
103
Member Avatar for dadam88

I have tired several things....And i still can't pinpoint on what I can do differently. I want the dowhile loop to run untill r, b or g is entered. I have tried commas like in the below code and other things exp... while (pick != r || pick != 'g' …

Member Avatar for arkoenig
0
92
Member Avatar for cocoll

hello! recently i have known that there is graphics in c++,so i searched in the internet for a step by step tutorial that i can draw frames buttons textboxes comboboxes labels and others but i can't find anything and this weird because you can find tutorials for all languages except …

Member Avatar for sundip
0
143
Member Avatar for Drakarus

I am making a program that involves adding time. It involves adding a beginning time, duration which would lead to the result of an end time from the sum of beginning time and duration. I will illustrate the problem i am having below: 12:15 start time with a duration of …

Member Avatar for Aranarth
0
88
Member Avatar for smoothe19

A binary search tree can be used to sort a list. WE simply insert the list elements into a BST, initially empty, and then use an inorder traversal to copy them back into the list. Write an algorithm for this treesort method of sorting, assuming that the list is stored …

Member Avatar for smoothe19
0
148
Member Avatar for Drakarus

Problem 1: I was wondering if it's possible to add for example the struct below into a binary tree: [CODE=c] struct Appoint { string place; string title; int hour, minute; int durationHr, durationMin; }; [/CODE] I want the above struct to be sorted in the binary tree by hour and …

Member Avatar for Drakarus
0
268
Member Avatar for ota1it1iuss

Sorry, I originnaly posted this in the Geek Lounge: Okay, the first project was to build a calculator that functioned as follows: ----------Using the example functions about, write a calculator program. Allow for the user to enter a simple math functions to evaluate: (Note: the '>' designates user input for …

Member Avatar for sfuo
0
2K
Member Avatar for okwy

Can some one please help me on this issue as I have spent time going around it without making any headway. I have data in an array of size say 3O. 1. I want to take the first five elements of the array, find their mean value. Store the value …

Member Avatar for abhimanipal
0
9K
Member Avatar for programing

Hi .. for(int i=1;i<=n;i++) { first=i%10; last=i/10; ....... i want to see how many number that first number equal last number; like 3003..and 1,2,3... is counted because its a single numbers but my statmant it is just count the num unti 100 and its not count the single numbers .. …

Member Avatar for programing
0
98
Member Avatar for VBNick

If I am using overlapped sockets with i/o completion ports, is it ok to use WSASend on a socket to send data [B]after [/B]posting the initial WSARecv on that same socket, but [B]before [/B]having received any data? Will the socket still receive data and trigger the completion port if I …

Member Avatar for VBNick
0
91
Member Avatar for David_Omid

Hey, sorry if this question is really really simple and silly to ask here but I can't find a suitable answer anywhere else and nobody out there so far is willing to help me out so any help would be greatly appreciated. Simple thing I want to do: I have …

Member Avatar for VernonDozier
0
108
Member Avatar for jackmaverick1

I have been frustrated by the lack of a time unit in all the C/C++ std librarys (hope I've got the right wording!). What is a function that I could use. I don't care if I write it or if it is in a library. Thanx in advance!

Member Avatar for caut_baia
0
231
Member Avatar for daviddoria

With std::queue I've been using this: [code] std::queue<int>::iterator pos = std::find( q.begin(), q.end(), 5); [/code] But when I try that with std::stack : [code] std::stack<int>::iterator pos = std::find( s.begin(), s.end(), 5); [/code] I get [code] error: ‘iterator’ is not a member of ‘std::stack<int, std::deque<int, std::allocator<int> > >’ [/code] Anyone know …

Member Avatar for AuburnMathTutor
0
5K
Member Avatar for yoni0505

I want to add some while() loop to a windows form app, the problem is that when I try its freezing the window because of the loop. There is any way or method to add a loop that won't freeze the window?

Member Avatar for yoni0505
0
143
Member Avatar for jos_t_tarigan

hi, im trying to read a binary file with header. so i manage to read the header by calling this: [CODE=c]fread(&headers, sizeof(MtexHeader), 1, fp);[/CODE] the header contains the size of the real content. i call those content by calling this line: [CODE=c]fread(out, sizeAccordingToHeader, 1, fp);[/CODE] but it always returns me …

Member Avatar for Lerner
0
84
Member Avatar for sabareesh

String operator+(const String &s) Here String is a class. here why we are using ampersand operator? please explain me.(&s ?)

Member Avatar for sabareesh
0
179
Member Avatar for racoon8995
Member Avatar for vijayan121
0
170
Member Avatar for Frederick2

My title says it all! I'm completely mystified by this - have been working at it all day with no resolution. The fundamental assumption under which I am laboring is that when a Dll is loaded into a host's process, the Dll will receive a DLL_PROCESS_ATTACH message. I have been …

Member Avatar for Frederick2
0
1K
Member Avatar for dansnyderECE

I need to convert an ASCII string like... "hello2" into it's decimal and or hexadecimal representation (a numeric form, the specific kind is irrelevant). So, "hello" would be : 68 65 6c 6c 6f 32 in HEX. How do I do this in C++ without just using a giant if …

Member Avatar for vijayan121
0
218
Member Avatar for ftl25

Hi. I am a C/C++ newbie. I am looking for advice on best practice. I am building an application which will take an input command (string), compare it with a list of stored commands, and go off to the relevant function. What i'd like to know is; what is the …

Member Avatar for mike_2000_17
0
177
Member Avatar for newworldcoder

I am very new to development and have been sinking my teeth into C#. I have an application that was written in C++ which is out of my depth, and I was wondering if someone could explain how I would recreate this in c#. The application sends message to linux …

Member Avatar for sundip
0
360
Member Avatar for Matt Tacular

Does anyone know an easy way to do array's of arrays? I'm not 100% sure this is the thing I want though because I just need a simple way to make a loop able to change the list it's comparing. I have the loop done, I just can't figure out …

Member Avatar for chanthutshamsu
0
168
Member Avatar for yoni0505

Hi there, I want to make a program with visual C++ 2010 using windows form. My problem is that I want to include "windows.h" and I can't find out how to do that. I want to include "windows.h" to use functions such as SetPixel() and some others... If it's possible, …

Member Avatar for yoni0505
0
954
Member Avatar for cgcgames

Hi Everyone. I have been Looking around for a Tutorial on Forms in Visual C++ I found a nice graphical calculator walkthrough for C# but the code for C# and C++ is a little diffrent and I cant get it working in C++. I am trying to make a Form …

Member Avatar for kirennian
0
235
Member Avatar for viv0411
Member Avatar for sundip
0
113
Member Avatar for rax_19

:cool: hi Friends,.,. !! i want to know a perfect time consumption for a given particular program.. [B][COLOR="red"]IN MILLISECONDs[/COLOR][/B] I know the way of using following method: [CODE=c] start=clock(); /*... ... my programming logic . . . ... */ end=clock(); difference=(end-start);[/CODE] But it gives time in seconds , which is …

Member Avatar for rax_19
0
295
Member Avatar for qqwushi12345

Write a program that displays all the prime numbers between 50 and 100. Below is my code: [CODE]Write a program that displays all the prime numbers between 50 and 100. please correct my mistake, thank you. #include <stdafx.h> #include "genlib.h" #include "simpio.h" #include "math.h" int _tmain(int argc, _TCHAR* argv[]) { …

Member Avatar for VernonDozier
0
2K
Member Avatar for darksmokepunch

Hi I have a question with regards to storing and retrieving a players location in a game. At the moment I'm working on a text based dungeon game, and one of the things I am having trouble implementing is, a way to move between rooms in the game world (I.E. …

Member Avatar for darksmokepunch
0
151
Member Avatar for qqwushi12345

Write a program that displays the table of Fahrenheit - Celsius temperatures. Below is my code, the problem with it is that the celsius column is all zeros,please correct my mistake, thank you: [CODE]#include "stdafx.h" #include "genlib.h" #include "simpio.h" #include "math.h" int _tmain(int argc, _TCHAR* argv[]) { int i; double …

Member Avatar for qqwushi12345
0
3K

The End.