49,761 Topics
| |
Hii I wanna list all the files and folders of a particular drive. Any sample codes available... Give me a link to them... Thanking you | |
(10 marks) Write a functiom in C++ which when passed 2 different lower case strings s1 and s2 will return true if the strings are anagrams. Note that 2 strings are anagrams if they contain exactly the same letters with the same frequency. im doing a past paper for an … | |
There is a cgi code written in C++. Currently there is no session management done in the web pages. There is a need to provide sessions in the web pages so that the user can login, maintain session and then logoff. While this is a fairly simple task in java … | |
Hey:) I'm not actually sure what it's called..so just calling it "mouse window locking" - What i mean by this is how do you lock the mouse to a window ie: The mouse can not leave the window unless you alt tab. So when the user drags the mouse to … | |
Hello everyone! I am trying to use polymorphism to have a little physics simulator that draws objects to the screen. Each object has properties like mass, friction, position, velocity, acceleration and such similar things, as well as a pointer to a SHAPE object which describes the shape of the object. … | |
[code=cplusplus]#include <iostream> #include <cstdlib> using namespace std; int main() { cout <<"enter the problemset and number""\n"; //problems represents name and numbers string problems; string problem_name_and_numbers=problems; string numbers; char quote; int total_length=problems.length(); //gather name if(cin.peek()=='"' || cin.peek() == ''') { cin >>quote; getline(cin,problems,quote); int problemslength=(problems.length()+1); int difference=total_length-problemlength; numbers=problem_name_and_numbers.substr(problemlength,difference); } else { … | |
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 … | |
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] … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
Hi, How to get process id of external application in windows. | |
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 … | |
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 … | |
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! | |
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 | |
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 … | |
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 … | |
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(); } … | |
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? | |
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 … | |
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 … | |
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 … | |
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; … |
The End.