Search:
Type: Posts; User: chiragrr
Search:
Search took 0.03 seconds.
-
April 21st, 2008, 05:01 PM
Also teaches you debugging ;)
-
April 21st, 2008, 05:00 PM
Dude read up on loops for. Put the for (;;){ before cout<<"please enter.... " and then put the ending brace before System Pause call
-
April 21st, 2008, 04:56 PM
Hey Guys,
I am looking for some help on how to get a HMAC hash for a string s using key k.
I found this(http://www.hmug.org/man/3/HMAC_Init.php) but I have no idea how to use it. Any pointers...
-
April 21st, 2008, 02:05 PM
I think you need to understand .doc headers as mentioned by 7sutd
-
April 18th, 2008, 05:10 PM
1) Put "sleep 300" in the perl file and run it infinitely
2) Use shell script and use that
These two are easier than C program. C++ - Never reinvent the wheel
-
April 18th, 2008, 04:13 PM
A few problems
1) You have created an integer array of 150 and but if I chose a number between 0 and 1000000 it could take me more tries. This is assuming I do not use binary search
2) You never...
-
April 10th, 2008, 05:17 PM
Depends on the firewall config on the server. You can do a TCP open on a known port but other than that I am not sure how to check whether the server is up and running.
If you are on a broadcast...
-
April 10th, 2008, 05:14 PM
My recommendation is that you are wasting too much space for the unused characters.
1) Switch to using string instead of char array
2) At the end of each entry put in a special character. seekg...
-
April 10th, 2008, 05:08 PM
Just use
ifstream infile ("Filename");
string name[10];
int marks[10],i;
if (! infile.is_open())
{
-
April 9th, 2008, 05:16 PM
Sorry about being less ignorant while posting. Anyways I figured out the issue and thanks for taking the time out to respond. Henceforth I will make sure that I follow the guidelines
-
April 8th, 2008, 08:19 PM
In short there is not optimal way of doing things here ;)
-
April 8th, 2008, 07:56 PM
I agree with Lindley here. You can read the file with the censored words into an array or a Vector (safer option)
-
April 8th, 2008, 07:35 PM
You can actually create a Vector of a struct
struct words
{
string word;
int pos;
};
-
April 8th, 2008, 07:33 PM
I am trying to compile my program but am getting what I think are linker/compiler issues
chiragr@irrawaddy uname -a
Linux irrawaddy 2.6.23.8 #6 SMP Wed Nov 21 14:18:12 PST 2007 i686 AMD...
-
April 8th, 2008, 06:39 PM
Start redoing your Java stuff in C++ nothing different nothing new. This would mean you would end up spending less time defining and understanding the problem and more time on C++
-
April 8th, 2008, 06:36 PM
You can do the same by the following
//GLOBAL DEFINITION
int ast_length=0;
char *ast;
//WITHIN THE LOOP
{
-
April 8th, 2008, 06:09 PM
read up on how to read and write binary files reading seekp/seekg and tellp/tellg
-
April 8th, 2008, 05:36 PM
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
using namespace std;
int main()
{
string x;
-
April 8th, 2008, 04:33 PM
ditto and close to the same time as well :D
-
April 8th, 2008, 04:33 PM
Its going to be easier to debug this using gdb or any other tool that you use. I would say the worst case once you have read both the strings print them to check the contents. This would then give...
-
April 8th, 2008, 03:58 PM
I agree but what about the case where two distinct entries have the same number of votes which is equal to max votes.
If its only about printing values then it can be void function. If you need...
-
April 8th, 2008, 03:00 PM
I think you can achieve this in the same function as read.
Initialize two more variables
int maxvotes=0;
string max;
while(!inStream.eof())
{
inStream >> name;
-
April 8th, 2008, 02:40 PM
If its a \0 terminated string you could use send (socket, array,strlen (array),...)
-
April 8th, 2008, 02:25 PM
I would like to add that instead of
#include "/usr/include/sys/types.h"
#include "/usr/include/sys/socket.h"
I originally had
#include <sys/types.h>
#include <sys/socket.h>
-
April 8th, 2008, 02:24 PM
I am trying to compile my program but am getting what I think are linker/compiler issues
chiragr@irrawaddy uname -a
Linux irrawaddy 2.6.23.8 #6 SMP Wed Nov 21 14:18:12 PST 2007 i686 AMD...
|
Click Here to Expand Forum to Full Width
|