Cannot understand the C errors


Login or Register for Dates, Times and to Reply

 
Thread Tools Search this Thread
Top Forums Programming Cannot understand the C errors
# 1  
Cannot understand the C errors

I have this peice of code I was hoping someone could look at. I use valgrind ./a.out to test it and it comes up with errors but none that I can understand.
Maybe someone here could help me.
The code is here:

Moderator's Comments:
Mod Comment Neo - Pastbin Link Removed - Do Not Use Pastebin in these Forums

Last edited by Errigour; 10-30-2012 at 04:00 AM..
# 2  
Quote:
Originally Posted by Errigour
it comes up with errors but none that I can understand.
Honestly - neither we can, as long as you keep them secret.

bakunin
# 3  
Quote:
Originally Posted by Errigour
I have this peice of code I was hoping someone could look at. I use valgrind ./a.out to test it and it comes up with errors but none that I can understand.
Maybe someone here could help me.
The code is here:
project
Can you post the errors too...
# 4  
I ran your code with valgrind. I just ran it up and selected exit. It listed a bunch of leaks. As far as I can tell, you don't release any of the ncurses objects.

I haven't run a scenario, so you may have more in your code.

I built your app as:
cc -g untitled.c -o untitled -lncurses

I ran your app as:
valgrind --leak-check=full --show-reachable=yes ./untitled
# 5  
what do you mean release the ncurses objects?
# 6  
Every aquired resource needs to be released whether if be a block of memeory, a file, an ncurses window ... I would have thought that was obvious.
# 7  
I must have missed that part of the document could you show an example? Lemme post the errors i got also for these guys. It's funny because every error usually has a line number of the problem but this one doesn't. Ok never mind the pasting seems to ignore my \ns so its just jiberish. You gotta compile and use valgrind like he did to see the errors. again none of the errors have line numbers corrisponding which is wierd and gcc doesn't say anything about it.
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #654
Difficulty: Easy
DOS was initially released on the IBM System/360.
True or False?

9 More Discussions You Might Find Interesting

1. Programming

Please help me understand errors in perl program

co #! /usr/bin/perl use strict; use warnings; use diagnostics; my $amount=""; my $bain; ; my $code=""; my $date;my $day;my $line; my $mo; my $LNUM = 0; my $xyz=""; my $yr; $yr = 2015; my $F; my @F; while (<>) { chop; ++$LNUM; @F = split(';'); if ( $F eq "Date" )... (1 Reply)
Discussion started by: hpk
1 Replies

2. Shell Programming and Scripting

can't understand!

Hi All, can you please help me to figured out what's the meaning of this. ${SERVER_DATABASE} -b << EOF 2>>/dev/null THanks, (3 Replies)
Discussion started by: nikki1200
3 Replies

3. AIX

How to read or understand errors in errpt

Hello, after upgrading the memory to 96GB & 6 Dual Processor for P 550 ( and still not applied the parameters which some experienced posters said in post https://www.unix.com/aix/141835-oracle-database-running-slow-aix-nmon-topas-6.html ) I am getting system dumps. How to understand and... (1 Reply)
Discussion started by: filosophizer
1 Replies

4. Shell Programming and Scripting

Script to capture date/time in seconds in PERL... Cant understand errors

I'm Using this script to find the time of a file. I'm very much new to PERL and found this script posted by some one on this forum. It runs perfectly fine, just that it gives me following errors with the accurate output as well. I jus want the output to be stored in another file so that i can... (0 Replies)
Discussion started by: bankimmehta
0 Replies

5. UNIX for Dummies Questions & Answers

Major OS errors/Bash errors help!!!!

Hi all, dummy here.... I have major errors on entering the shell. On login I get: -bash: dircolors: command not found -bash: tr: command not found -bash: fgrep: command not found -bash: grep: command not found -bash: grep: command not found -bash: id: command not found -bash: [: =: unary... (12 Replies)
Discussion started by: wcmmlynn
12 Replies

6. UNIX for Dummies Questions & Answers

can't understand this at all.

Ok, i've been trying to write some shell scripts. nothing challenging, but just automating All of the tutorials i read say to start the file with #!/bin/bash or whatever your path to bash is. So i do it, and all of my scripts error out saying ./nameofscript:command not found when i... (4 Replies)
Discussion started by: severndigital
4 Replies

7. UNIX for Dummies Questions & Answers

can't understand

how i can download this game n start it :S (5 Replies)
Discussion started by: BoyArcher
5 Replies

8. AIX

Adapter Errors and Link Errors

$ errpt | more IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION 3074FEB7 0802050205 T H fscsi1 ADAPTER ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR 3074FEB7 0802050205 T H fscsi0 ADAPTER ERROR B8113DD1 ... (2 Replies)
Discussion started by: mcastill66
2 Replies

9. UNIX for Advanced & Expert Users

Adapter Errors and Link Errors

$ errpt | more IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION 3074FEB7 0802050205 T H fscsi1 ADAPTER ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR 3074FEB7 0802050205 T H fscsi0 ADAPTER ERROR B8113DD1 ... (0 Replies)
Discussion started by: mcastill66
0 Replies

Featured Tech Videos