49,761 Topics

Member Avatar for
Member Avatar for rasheed1984

Respected Users. I am implementing a kind of hash table in my simulations. I have a message which contains (Timestamp, Random Number, and Location (x,y)) information. Now i need to calculate [B]H(Timestamp||Random Number||Location). [/B] I have no idea how to do that and need some starting point and help in …

0
30
Member Avatar for vishy1618

Well, I am currently learning Qt and I develop on two systems, a Mac OSX 10.5 and Ubuntu. I decided to make a small app with the default template in QtCreator (Qt4 GUI app). I put some menubar entries, and the last entry "Exit" is separated by a separator. While …

Member Avatar for vishy1618
0
111
Member Avatar for miskeen

Hello, I have a file where the data layout is known. Suppose it's like this: image1 SomeData ... image1000 SomeData ... I want to get an access to the line I want without the necessity to move across all the lines. Let's say I wanna access directly to the line …

Member Avatar for miskeen
0
98
Member Avatar for artikapri

I wanted to know if there is a function in visual studio C++ 2005, that is called on if your mouse hovers over something, and how to use it?

Member Avatar for Ancient Dragon
0
43
Member Avatar for spdbump08

Hello, I'm having a bit of trouble figuring out how to get C++ to output something to a text file. Any help would be very appreciated. Here is the code: [code] //THIS PROGRAM IS INTENDED TO GENERATE THE SQUARE ROOT OF AN INPUTTED NUMBER USING A WHILE LOOP AND A …

Member Avatar for Ancient Dragon
0
127
Member Avatar for soapyillusion

Hey guys I have a almost seemingly trivial problem yet its probally so simple. No matter how hard i try I can never seem to get the format of the cout statements to look they way i want. I always use the setw command and set precsion, even the left …

Member Avatar for Ancient Dragon
0
90
Member Avatar for JohnPhilipps

Good evening everyone, I have been working on a base\derived class C++ program in which I am trying to compare the areas of a couple of Rectangles, and once I get past the errors I am currently having, I wouldn't mind comparing the Square to the rectangle, but first things …

0
82
Member Avatar for vbx_wx

i know there are many ways to hide a console window,but all of them that i test ,they all pop for a second and disapear,how can i do so its doesnt pop at all ???

Member Avatar for Ancient Dragon
0
37
Member Avatar for Schottenhemir

I'm supposed to output a program that comes out like this: [URL="http://img638.imageshack.us/img638/4135/screen3t.jpg"]http://img638.imageshack.us/img638/4135/screen3t.jpg[/URL] And here is the top part of the code. It is supposed to read a .txt file that has the numbers of the: flight; passengers; and miles; [CODE]int flight, passengers, miles; float income, cost, profit, base, fuel; ifstream …

Member Avatar for Schottenhemir
0
217
Member Avatar for apo

how can a make the floating variable show just 4 digits i mean : 8.6540098 to just 8.654 i guess what i'm trying to say is "less decimals" :D

Member Avatar for jonsca
0
129
Member Avatar for moqbel

[CODE] #include<iostream> #include<fstream> #include<string> using namespace std; void main() { //decleration ifstream source; ofstream target; char * box; int width, height, numlevel; string s; int amount= 100; //-------------------- source.open("1.ppm",ios::binary); while(source.fail()) { cout<<"can not open the file"<<endl; // to make sure the file is opened } source>> s; if ( s …

Member Avatar for moqbel
0
93
Member Avatar for vbx_wx

heelllo i am trying to upload a file to a ftp server,here i smy code: [CODE] HINTERNET internet; HINTERNET ftp; internet = InternetOpen(NULL , INTERNET_OPEN_TYPE_DIRECT , NULL , NULL , 0); ftp = InternetConnect(internet , "127.0.0.1" , INTERNET_DEFAULT_FTP_PORT , NULL , NULL , INTERNET_SERVICE_FTP , 0 , 0); bool x …

Member Avatar for vbx_wx
0
154
Member Avatar for gregarion

Hey guys, i am having a problem in getting to store data in a text file. I have a certain text file which contains data in this format... [CODE]Jimeno Rames James Kimon[/CODE] what i am tryng to do is to store each line into a seperate value. The problem i …

Member Avatar for jonsca
0
89
Member Avatar for jeffmt1234

I can't seem to wrap my head around what I'm doing wrong. I'm trying to create an N-ARY tree. I'm pretty sure I'm close. But the nodes are filling wrong. I have used cout to output the nodes as they fill and sometimes the nodes are filling with the same …

0
28
Member Avatar for some

Hello everyone, I have a question regarding advanced file manipulation. I am trying to make a function that will take in a number which will be the number of a record and basically take that record out and display its contents and let the user edit it. Here is the …

Member Avatar for SCarlisle
0
111
Member Avatar for johndoe444

[CODE]map<string, int> Employees; Employees.insert(map<string,int>::value_type("John A.",7582)); [/CODE] what does the value_type do? what is the difference between pair() and make_pair()

Member Avatar for johndoe444
0
122
Member Avatar for Priyanka88

hi I am having VC++ 2008 express edition downloaded few days before....will you please help me how to compile c++ source file,debug and run it....pls....hv no time to read dat help topics...pls help me out!!

Member Avatar for Priyanka88
0
159
Member Avatar for aroma7
Member Avatar for gnarlyskim
-2
100
Member Avatar for MVB

Hey guys. I'm having some issues with my Visual Studio 2008 Pro. I'm trying to compile the following code, included in the link [url]http://pastebin.com/r6WsG5r7;[/url] but, whenever I try compiling the code, I get like 5 erros: The errors are listed below. Why is it that moving certain declarations around changes …

Member Avatar for Salem
0
419
Member Avatar for sana zafar

Hi all, I need to write a program that will first read a file and then 1. Output all the words that appear in a file. 2. Treat only sequences of letters and digits as words, i.e., all other characters such as punctuation marks should be used as word delimiters, …

Member Avatar for gnarlyskim
0
118
Member Avatar for wale89

[QUOTE]Hello..can anyone help me in order to solve this problem regarding the collision that happend.. I use the modulo-division hash function and intended to use the chaining solution method to resolve this collision but i got stuck.. because i dont really have the full knowledge in link list..Can someone that …

Member Avatar for craig_ka
0
631
Member Avatar for buzzykerbox

Hey,have been having a problem with this code,dont no what to do here,trying to find the letter in the secret word in hangman.when the user inputs their choice how do i compare it with the secret word.was using a for loop but not sure [CODE] cout<<"\n\t\t *********** H A N …

Member Avatar for Fbody
0
79
Member Avatar for biggie_smalls

Hey all, I got interested in using smart pointers and tried to implement the following solution: [URL="http://www.davethehat.com/articles/smartp.htm"]http://www.davethehat.com/articles/smartp.htm[/URL] It's probably far from perfect but this is mainly a learning experience. It's a non intrusive reference counted implementation of a smart ptr. And somewhere in the article the assignment operator is defined: …

Member Avatar for Fbody
0
190
Member Avatar for amirdragon

Hi everyone I am a C# programmer but recently I faced a problem which i guess it would be solved using C++ ( still not sure!!!) I want to have the list of data type definitions existing in native windows kernel module. I would be appreciated if anyone could give …

0
27
Member Avatar for vbx_wx

i have the following code: [CODE] HWND window; char name[MAX_PATH]; while(1) { window = GetForegroundWindow(); GetWindowText(window,name,sizeof(name)); strcat(name , "\n"); WriteToFile(name); } [/CODE] i just want to print it once,and if i open a new window,print that too,once....and so on.....and i dont know what condition to put to work corectly :(

Member Avatar for Ancient Dragon
0
145
Member Avatar for Fenlevi

Hi guys, In my lab I was given a source code and was tasked to write the function to compute the largest value of a vector, and a for loop to show how elements does the vector has.But the output is now right,it gives me the largest element is zero,and …

Member Avatar for MyrtleTurtle
0
139
Member Avatar for Falmarri

It's been about a year since I've used C++, and I'm having a weird error that I can't remember why it does this, or if there's actually something wrong. My destructor gets called twice when I declare my object via the first method, and only once (correctly) when it declare …

Member Avatar for webs1987
0
232
Member Avatar for aa_day90

I haven't got any luck finding why this program wouldn't work. Here's the code. [CODE]int main (void) { ifstream file; char *streamer = NULL; file.open("now.txt", ios::in | ios::binary); if (file.is_open()) { while (!file.eof()) { streamer = new char[33]; cout << "Prestream: " << streamer << endl; file.read(streamer, 32); cout << …

Member Avatar for aa_day90
0
93
Member Avatar for a4aadi

here is code[ [CODE]#include<iostream> #include<fstream> #include<conio.h> using namespace std; struct book_dtail { int copies; char title[50]; char author[50]; int year; char **bn; }; void main() { int size; ifstream indata; book_dtail user_book[5]; indata.open("file path to be added here"); for(int count=0;count<5;count++) { indata>>size; user_book[count].copies=size;//2D array initialized. user_book[count].bn=new char*[size]; for(int temp=0;temp<size;temp++) { …

Member Avatar for a4aadi
0
95
Member Avatar for hurricane123

I wanna know how 2 return string by using function for example if we want to check the lenght of string we use cout<<strlen("c") but how to use this by fuction

Member Avatar for webs1987
0
117

The End.