49,755 Topics

Member Avatar for
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
97
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
107
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
178
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
941
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
234
Member Avatar for viv0411
Member Avatar for sundip
0
112
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
149
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
Member Avatar for reolynda

[CODE]#include <iostream> using namespace std; int main() { int i,j; float a[10][10]; for (i=0; i<10; i++) { for (j=0; j<10; j++) { a[i][j]=0.2; a[i][j]=a[i][j]-0.2; cout<<a[i][j]<<"\n"; } } } [/CODE] //// why is the output not exactly 0.00 ??? how do i make it output 0.00

Member Avatar for reolynda
0
96
Member Avatar for Haranadh

Hi Can I use the this object inside the constructure of a C++ Class? please share if any one have idea what are the issues we may fall into.

Member Avatar for Haranadh
0
76
Member Avatar for gameon
Member Avatar for ota1it1iuss

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 cin) >5 >+ >7 >= result:12 or: >5 >+ …

Member Avatar for ota1it1iuss
0
201
Member Avatar for ana_1234

I have an assignment in class I'm and almost done but I need help with one part. Within each subject in the output file, list the students in alphabetic order, sorted by last name. Do not change the given case (upper/lower case) of the names that were read from the …

Member Avatar for ana_1234
0
2K
Member Avatar for escortcosworth

Hey guys, iam assigned a program that has to read in 3 values (sides of triangles) at a time and find the area. The values have to be read from a file, they are in a loop as there can be as many sets of triangles as the user wishes, …

Member Avatar for escortcosworth
0
78
Member Avatar for rObOtcOmpute
Member Avatar for rObOtcOmpute

I posted a thread a bit earlier about a simple error, but this is more of my main issue. I have a struct: [CODE=C++] struct Inventory { string ItemName; int ItemQty; float ItemPrice; }; [/CODE] with the intention of creating an array for storing an inventory array. I can't seem …

Member Avatar for rObOtcOmpute
0
220

The End.