49,756 Topics

Member Avatar for
Member Avatar for giora88

Hello. I have a question about socket programming. I am using Linux. I want to establish a connection between a client and a server using the methods: Server: socket(), bind(), listen(), accept(), connect(), send(), recv(), close(). Client: socket(), connect(), send(), recv(). My question is: If I am a client and …

Member Avatar for Salem
0
118
Member Avatar for Niner710

Hi, I am a newbie to C++ and want to know how to parse thru a binary file. I am having some trouble with some simple code. I have a sample binary file(test.bdb) that has "0069 0045 0089 0090" in the file. Here is my code for the file. [code] …

Member Avatar for Dave Sinkula
0
2K
Member Avatar for julia2009

I'm writing a program in C++ under Linux that needs to wait for user to press a key. Considering the key pressed the program will go accordingly. So I must be able to recover the key code from a variable afterwards. I will appreciate a good help.

Member Avatar for ArcRoyal
0
1K
Member Avatar for swati11

Hi, I am creating a dll based VC++ project.I believe I am facing some memory issues. I have checked the code and for every memory allocation by using the new operator I have included a delete operator to deallocate the memory. May be there are some memory leaks which are …

Member Avatar for wildgoose
0
75
Member Avatar for anirbanjoy

Hi, I have 3 seperate make file where, 1st one generates a static library libCanOpen.a, (using ""ar -r ") 2nd one creates a dynamically linkable library libPixyCANopen.so (using "g++ -Wall -fPIC -shared") and the 3rd one creates the executable by linking it to libPixyCANopen.so. The 1st two makefiles build without …

Member Avatar for anirbanjoy
0
372
Member Avatar for iskhan
Member Avatar for lexusdominus

Im having some problems organising my code in a large (for me) project. Basically my problem stems from having 1400 lines in one source file. Ive written 38 functions which all have declarations above the main function. Below my main function block i have all of the function definitions. Im …

Member Avatar for lexusdominus
0
157
Member Avatar for begnnr_help

I have a problem where I am writing a program that has a predefined costs for tickets. The program asks what city you want to go to and then it asks how many tickets you want to buy and it calculates the cost. If you want more it will ask …

Member Avatar for begnnr_help
0
198
Member Avatar for sparcheta3

Hi guys, I'm new and self teaching myself C++. A problem from the book says to create the CandyBar Struct and the create a dynamic array that hold 3 structures, initialize the structures and output each of them. The code works BUT I'm wondering if there is an easier way …

Member Avatar for jencas
0
139
Member Avatar for Micky Holtern

Hello. I have a strange problem in VS 2008. I have ascii - codes of simbols and I want to have a String^ variable as result of converting. That is my code: [code] int arr[10];//array with ascii codes of simbols. ... unsigned char a; String^ str; for ( int i …

Member Avatar for Micky Holtern
0
95
Member Avatar for seao111

I would like to know the best way to enumerate a network domain and check if the computers within this domain have a certain file on their computer. Code Structure: (1) Program enumerates local network, stores client computers to a string array (2) Program checks all enumerated computers on the …

Member Avatar for jencas
0
99
Member Avatar for mathueie
Member Avatar for Nick Evan
0
87
Member Avatar for chaines51

I have a class (String) that I want to be able to implicitly convert to a char. How would I go about doing this? I know to do it the other way around, I just add a constructor that just takes a char as a parameter, but to convert from …

Member Avatar for chaines51
0
168
Member Avatar for gwen73

I am writing a program that uses structure named movieData to store the following information about a movie: Title Director Year Released Running Time (in minutes) The program should create two movieData variables, store values in their members, and pass each one, in turn, to a function that displays the …

Member Avatar for s_sridhar
0
163
Member Avatar for rosiecomsoft

can anyone plz tell me how can we implement hash tables with chaining i mean insertion using link lists! i have to submit it on 22 and i haven't got a clue how to do it!

Member Avatar for csurfer
0
80
Member Avatar for gergep

and it looks like this: [CODE] void Functions(int s) { s += 5; } [/CODE] then can i call it somehow in c, c++, or cocoa something similar to [CODE] void DoSomething(int s) { Function* function = myfile.readFunction(Functions); execute(function(s)); } [/CODE] any help would be appreciated thanks in advance

Member Avatar for gergep
0
128
Member Avatar for vishalonne

Hi Every Body I am new born in C++ I am facing and error for last 3 days I tried my best with all what I knew but FAILED..... Error is - " Linker Error: Undefined Symbol Library::code in module PRGDONE.CPP" I am using Turbo C++ 3.0 of Borland Here …

Member Avatar for monkey_king
0
200
Member Avatar for george_cpp

Hi All, Does anyone know which file manipulation library is faster between c's FILE and c++'s fstream? I would suppose that c++'s fstream would be the faster but I just wanted to see some expert advice/opinion on this. I googled the internet without finding anything concrete. If there is any …

Member Avatar for monkey_king
0
5K
Member Avatar for goody11

For some reason my shutdown function that i'm making won't work. I get this error: In function `void shutdown()': expected `,' or `...' before numeric constant Here is my coding: #include <windows.h> void shutdown(); void shutdown() { BOOL WINAPI ExitWindowsEx(UINT EWX_REBOOT, DWORD SHTDN_REASON_MAJOR_HARDWARE); return; } int main() { shutdown(); } …

Member Avatar for goody11
0
181
Member Avatar for walter clark

From the point of view of a command line programmer (whose been at it for 25 years) what is the difference between MFC and .net?

Member Avatar for Stinomus
0
815
Member Avatar for walter clark

Can someone please correct this... Microsoft is in the best position to answer questions, but they are incapable of saying anything negative about ATL, MFC, Win32 or anything else they invented. Beginners are left with the impression that nothing is better than anything else. Can someone (who is willing to …

0
59
Member Avatar for chandru_shan

Hi Friends, My application crashes with an error saying "Demo Application pk/si component has stopped working". The systems Event Viewer log shows an error with the following details. [B]"Faulting application Demo.exe, version 1.0.0.1, faulting module OLEACC.dll,version 4.2.5406.0, time stamp 0x4549bd93,exception code 0xc0000005,fault offset 0x00004062,process id 0x154c,application start time 0x01c9ee94aab4c550"[/B] I …

Member Avatar for Salem
0
213
Member Avatar for dave49

I'm very confused. I'm suposed to expand this pointer-based list class in this program by setting ListItemType to int then adding methods to find the smallest number, the largest number, and the average of the list. Before I added the findLargest function the program would compile but, when ran, gave …

Member Avatar for dave49
0
250
Member Avatar for catchmrbharath

I am having a problem in implementing of sieve of eratosthenes.. please check the code and tell me the error [CODE] #include<iostream> #include<cstdio> using namespace std; int main() { int i,j; long array[100001]; int count=0; for(i=1;i<100001;i++) { array[i]=i; } for(i=2;i<100001;i++) { if(array[i]!=0) { cout<<""<<array[i]<<endl; int j=0; j=i*i; while(j<100001) { array[j]=0; …

Member Avatar for siddhant3s
0
290
Member Avatar for Clockowl

Hey guys, Can I tell istream to ignore ALL the characters until the delimiter char? It can be done with a loop but it's kinda weird I can't tell istream "discard until this char" imho, so maybe there's an hidden option somewhere. Thanks in advance!

Member Avatar for Narue
0
276
Member Avatar for elisgugu

Hello! I am using BCB and I really need a help I have to fetch the value from each row in a table and I know I have to add a loop,but when I read the buffer-it takes only the firs value in the firs row in the field and …

Member Avatar for elisgugu
0
101
Member Avatar for Sky Diploma

I am confused by the use of an un-named namespace and its practical applications. The C++ Programming Language states that. [code] namespace { //Content } [/code] [b][COLOR="Green"]is equal to [/COLOR][/b] [code] namespace $$$ { //Content } using namespace $$$; [/code] Where $$$ is a unknown and random name. However I …

Member Avatar for siddhant3s
0
106
Member Avatar for cwarn23

Hi, I'm looking for an open source c++ compiler to embed into an ide project I'm working on. I'm using Visual C++ express 2008 and would like to know what you's recommend as I have heard of gcc and MinGW but don't know what is best and EASIEST as they …

Member Avatar for cwarn23
0
375
Member Avatar for rmlopes

Hi all, I am new to threads in c++, and I must use the pthread library. The documentation is easy to understand, but there is a more general aspect that I am missing. My question is: Is it possible to give a pointer to an object's function as argument to …

Member Avatar for rmlopes
0
116
Member Avatar for saalvi

Problem Statement: Writing and Reading student data in a file. Detailed Description: Write a program in which you have to: 1) Create a text file "Student_info". 2) Using Code Write the following data in it: Roll NO Student Name Class 101 Ali Raza BS(CS) 102 Usman MS(CS) 103 Faizan BS(CS) …

Member Avatar for siddhant3s
0
166

The End.