AmitTheInfinity's Profile User Rating: -----

Reputation: 117 Stalwart
Group:
Authors
Active Posts:
1,559 (0.56 per day)
Joined:
25-January 07
Profile Views:
13,112
Last Active:
User is offline Jun 08 2014 11:01 PM
Currently:
Offline

Previous Fields

Country:
IN
OS Preference:
Who Cares
Favorite Browser:
FireFox
Favorite Processor:
Who Cares
Favorite Gaming Platform:
XBox
Your Car:
Who Cares
Dream Kudos:
125

Latest Visitors

Icon   AmitTheInfinity Love to code, live to code

Posts I've Made

  1. In Topic: Can you guys see what's wrong w/my Malloc (using pointers to struc

    Posted 1 Jun 2014

    malloc returns void pointer, you have to explicitly typecast it to Employee structure pointer.

    Also, you already have an array declare in main, I could not understand why you are allocating dynamic memory and then assigning that to array again. empArray[i] = emp;

    Either have block of dynamically allocated employee structures or have an array. Don't mix them.
  2. In Topic: Help with First C program in Unix

    Posted 29 May 2014

    Your structure has lot of char variables. They won't be able to store strings. Make them arrays or character pointers if you want to store strings in them.

    also, in methods you are taking pointers as parameters and you are assigning them to member variables of structure, where there are no pointers. So either change structure to have pointers or change assignment or may be change parameters of your methods.

    like...
    typedef struct pInfo{
    	    char* name;
    	    char* first;
    	    char* middle;
    	    char* last;
    	    int ID;
    	    char* address;
    	    char* city;
    	    char* state;
    	    long zip;
    	     
    	} Person;
    
    
    void setID(Person* ob, int* ID){
    	    ob->ID = ID;  //either change this to *ID or change parameter to ID.
    	}
    
    
  3. In Topic: Enciphering & Deciphering

    Posted 23 May 2014

    View Postsavethepirate, on 23 May 2014 - 02:56 PM, said:

    to process the text in the file message.txt


    Is what I am talking about, you need to do file handling for that. Read data from your file and then apply your encrypt/decrypt logic on it. As of now you are not reading anything from file at all, you are just encrypting name of the file "message.txt".

    May be this tutorial will help you understand file handling.
  4. In Topic: Enciphering & Deciphering

    Posted 23 May 2014

    You are supposed to use file handling to read message from message.txt. Something like FileReader. Read data from file into a buffer (may be your String text) and encrypt it. Or You can try encrypting character by character.

    Also, I am not sure if your encryption logic is working correctly. Can you explain what exactly you are expecting it to do?
  5. In Topic: Help with C++!

    Posted 22 May 2014

    As Skydiver said, in function void print_balance () there are a couple of mistakes.

    First, when you are using a variable you don't need to write a data-type before it. That needs to be done only when you are defining or declaring it. so using double balance in cout statement in unnecessary.

    Second, you can not use a variable local to one function in another function. your variable balance is declared inside main function, so it's local to main. Another function print_balance can not access that variable. Either you have to make it a global variable or better sent that variable as parameter to function print_balance.

    There are lot of other things missing in your code that are expected in your assignment. But let's start with fixing these basic things.

My Information

Member Title:
C Surfing ∞
Age:
Age Unknown
Birthday:
June 24
Gender:
Years Programming:
9
Programming Languages:
C, C++, Java, J2EE, J2ME, .NET, PHP

Contact Information

E-mail:
Private
Website URL:
Website URL  http://
LinkedIn:
http://www.linkedin.com/in/patilamit
Twitter:
amittheinfinity

Friends

Comments

Page 1 of 1
  1. Photo

    HYK Icon

    13 Apr 2013 - 01:24
    Hi,,,,,I have graduation project in PHP using Drupal CMS, even now I couldn't find anyone who help me, I work on Airline reservation System, I stoped on reservation operation, Little time remaining please can help me
  2. Photo

    weblevi Icon

    22 Nov 2011 - 23:57
    Me and my group need to turn this in in 12 hours:
    Implement a C program that reads a string and prints a table with the number of occurrences of each character in the string. Ex: Rubber. r = 2, u = 1, b = 2, e = 1.
    If you could save us in this one I would be very grateful! my e-mail is: levi_web@yahoo.com
  3. Photo

    weblevi Icon

    22 Nov 2011 - 23:35
    Hey man I need some help with a program, i've been up all night and i can't figure it out can u give me a hand?
Page 1 of 1