AmitTheInfinity's Profile User Rating: *****

Reputation: 119 Stalwart
Active Posts:
1,584 (0.47 per day)
25-January 07
Profile Views:
Last Active:
User is offline Mar 02 2015 11:00 PM

Previous Fields

OS Preference:
Who Cares
Favorite Browser:
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Your Car:
Who Cares
Dream Kudos:

Latest Visitors

Icon   AmitTheInfinity Love to code, live to code

Posts I've Made

  1. In Topic: Pointer to the last node of a circular linked list

    Posted 4 Dec 2014


    pointer to the last node

    You are talking about a pointer to node. It doesn't matter whether it's a doubly linked list or not. It's a circular one with pointer to a node (as Salem_c said no node is last when you are in circular list). You can traverse with single pointer pointing to node.
  2. In Topic: Sometimes getting segmentation fault

    Posted 2 Dec 2014

    This is my primary analysis from what I have seen in your code (It would have helped more if you put entire code)

    As you are doing this memcpy(s,strInput,sizeToCopy+1);. And s is s = va_arg(argp, char *); a pointer that points to some string you sent in variable list to your function void scanfCustom(const char* input, FILE *inputSteam, va_list argp).

    Program might crash whenever your input string size (in getline) is larger than your string from variable list, as it goes beyond allocated memory for string from your variable va_list.
  3. In Topic: Program is Crashing, New User, Need Help

    Posted 30 Oct 2014

    Check line 50 again. You are sending judgeTotal with an ampersand there. Now check how you sent parameter highestScore when you called function findHighest. That's the difference I am talking about.

    When you send a parameter with ampersand, it means that you are actually sending address of that variable. That's why system is assuming that function must be having a pointer to take this value (a double *) where as your function declaration says that parameter is a double variable reference. That's why you are getting that error.

    Ampersand in signature of function definition or declaration is a different thing. That makes sure that parameter is a reference to variable.
  4. In Topic: Program is Crashing, New User, Need Help

    Posted 30 Oct 2014

    This is how you have defined your function after main (Line 221) :
    double calcScore(double score1, double score2, double score3, double score4, double score5, double lowestScore, double highestScore, double &judgeTotal)
    Which looks correct...

    This is how you called it (Line 50) :
    calcScore(score1, score2, score3, score4, score5, lowestScore, highestScore, &judgeTotal);
    Now here again compare this call with your findHighest function call. Are you treating judgeTotal exactly how you treated highestScore? check that difference.

    BUT your declaration above main is (Line 12):
    double calcScore(double &score1, double &score2, double &score3, double &score4, double &score5, double lowestScore, double highestScore, static double judgeTotal);
    Missed to change something here?
  5. In Topic: Program is Crashing, New User, Need Help

    Posted 30 Oct 2014

    Code please...

    Always make sure when you post some error, post code that gives this error as well. Even if it's just a 2-3 line change in your code.

My Information

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

Contact Information

Website URL:
Website URL  http://



Page 1 of 1
  1. Photo

    Lawlzes Icon

    30 Oct 2014 - 15:33
    He is awesome, took the time to explain code to me, even though I don't know much! Thank you!
  2. 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
  3. 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: [email protected]
  4. 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