htdefiant
Aug 8 2007, 06:42 PM
| | I just installed DevC++ Beta 4.9.9.2, the Stanford University standard. Then downloaded 4 extended libraries that my professor gave me, and ran a test program that was also given to me. Attached is my screenshot of errors. Something is wrong with the extended libraries, it looks like. Thoughts? |
Reply
osknockout
Aug 10 2007, 04:11 PM
Hi. It seems your problems aren't that bad actually. (I was thinking random library-object file error when I was reading the post) Ok, I'm going by the order that the actual errors were reported in the Dev-C++ screenshot. First: I don't know why, but one of your libraries defines 'bool' a second time. Go to line 61 of genlib.h and remove the bool definition there. There shouldn't be too many problems coming from that one line. Second: Ok, I think you need to add cstring.h to the header since the functions that are missing are probably from there. An include <cstring> should do it. Third/Fourth: As for lines 37 and 38, you're going to have to show the source code for us to find what's wrong, but it seems you just have an error in the test program there, probably with string format problems. If the first two don't work, go to your professor and complain that someone in the department's slacking off. 
Reply
htdefiant
Aug 10 2007, 07:13 PM
Thank you osknockout. I did the first step, but my knowledge of C is very limited. Can you please elaborate on the 2nd and 3rd things I need to do? Also I recompiled the test program and the genlib did not cause an error this time. Thanks a ton for your help.
Reply
htdefiant
Aug 10 2007, 10:27 PM
I recopied the extended libraries just to make sure I had the correct ones. I got a new error list.
Reply
osknockout
Aug 10 2007, 11:54 PM
No problem. I think you can skip the second step now. What happened before was that the functions strncpy and strcpy were not available. They're defined in string.h (not cstring.h - that was my mistake. It's cstring.h in C++ but just string.h in C) I was thinking that whoever made the libraries forgot to include string.h - just a simple #include <string,h> would have worked. Like I said, I'm pretty sure you don't need to do that because the library seems to work fine with those functions now. Now for the third thing:  Ok, the error you made was very simple - an innocent error actually. You put one line of code on two lines. You can't do that normally. Here's your code: CODE printf("%s and %s converted to upper case is %s and %s\n\n", str1,st2,ConvertToUpperCase(str1),ConvertToUpperCase(str2)); What happens is that the compiler thinks that the second line is a different statement from the first. What you have to do is put all of that code on only one line, OR you can put a / on the last "and" in the first line to tell the compiler that your code continues to the next line. / is the continuation character when put at the end of the line. So your code should look like: CODE printf("%s and %s converted to upper case is %s and %s\n\n", str1,st2,ConvertToUpperCase(str1),ConvertToUpperCase(str2)); or: CODE printf("%s and %s converted to upper case is %s and \ %s\n\n", str1,st2,ConvertToUpperCase(str1),ConvertToUpperCase(str2)); It looks like that should cover everything. Do tell if there are more errors, I might have missed something accidentally.
Reply
htdefiant
Aug 11 2007, 01:50 AM
OK. I am so sorry to be such a newbie at this. But, I just got so frustrated I deleted the file I was working on. This is the file that Stanford supplies you with to "test" your compiler: QUOTE /* This is a test program. This will check to see if the extended libraries are working fine in your compiler. Please make sure that all the printf statements are in one single line. E.g printf("%s and %s converted to upper case is %s and %s\n\n",str1,str2,ConvertToUpperCase(str1),ConvertToUpperCase(str2)); */ #include <stdio.h> #include "genlib.h" #include "simpio.h" #include "strlib.h" #include "random.h" int main(int) { int num,i; long num1; double num2; string line; string str1 = "chimpanzee"; string str2 = "gorilla"; //test simpio.h functions printf("Enter integer: "); num = GetInteger(); printf("%d entered\n",num); printf("Enter long: "); num1 = GetLong(); printf("%ld entered\n",num1); printf("Enter real: "); num2 = GetReal(); printf("%lf entered\n",num2); printf("Enter string: "); line = GetLine(); printf("%s entered\n\n",line); //test strlib.h functions printf("Concatenate %s and %s: %s\n",str1,str2,Concat(str1,str2)); printf("6th char of %s is %c\n",str1,IthChar(str1,5)); printf("Substring of %s from 3 to 7 is %s\n",str1,SubString(str1,3,7)); printf("%s and %s converted to upper case is %s and %s\n\n",str1,str2,ConvertToUpperCase(str1),ConvertToUpperCase(str2)); //this loops test a function in random.h printf("Here are 15 random integers from 1 to 50: "); for (i=0 ; i < 15 ; i++) { printf("%d ", RandomInteger(1,50)); } printf("\n"); getchar(); /*this line is needed so that the output screen will remain as it is till the user enters a key on the keyboard*/ } The first attachment is the picture of my errors. The second is a folder with the extended libraries I sent to the includes folder. The third is a folder (extlibnew.zip) with the replacements for for strlib.h and genlib.h. Sorry to be so much trouble. I won't make any more adjustments until I hear from you. Thanks again, os.
Reply
osknockout
Aug 12 2007, 04:16 PM
Hey, no problem. Ok, see the beginning disclaimer statement they have? QUOTE Please make sure that all the printf statements are in one single line. E.g printf("%s and %s converted to upper case is %s and %s\n\n",str1,str2,ConvertToUpperCase(str1),ConvertToUpperCase(str2)); You're supposed to put CODE printf("%s and %s converted to upper case is %s and %s\n\n",str1,str2,ConvertToUpperCase(str1),ConvertToUpperCase(str2)); as CODE printf("%s and %s converted to upper case is %s and %s\n\n",str1,str2,ConvertToUpperCase(str1),ConvertToUpperCase(str2));[ That's basically the only problem you have. Otherwise, your libraries are compiling perfectly. So make those two lines into one, recompile, and send us some feedback.
Reply
htdefiant
Aug 12 2007, 05:41 PM
I owe you one osknockout. Thanks for making me proofread! I pressed the delete button, and then the program compiled perfectly. Thanks a ton. If there is anything I can ever do for you...
Reply
osknockout
Aug 14 2007, 03:09 PM
Alright. ^^ Well, in case I ever need anything, I'll know who to contact
Reply
Recent Queries:--
how to correct the error on devc - 125.99 hr back. (1)
Similar Topics
Keywords : devc, error
- Wordpress Error - Bytes Exausted
NextGEN Gallery (5)
Help Me _ Error Message: "could Not Retrieve Session Record"
IPB-Forum error message (2) Hi ... Please I need help quickly ... I am an administrator of a "IPB-Invision Power Board Forum"
and I cannot login in the ACP (Admin Control Panel) anymore. When I write the user name and password
both are accepted and the login is successfull but then suddenly I get an error message that says:
Could not retrieve session record What can I do to solve the problem ? Please help me
!!!!!....
Phpbb3 - Error 28
(5) I get the following error when I try changing a users group of my Phpbb3 powered forums. QUOTE
SQL ERROR Got error 28 from storage engine SQL SELECT ug.*, g.* FROM groups g, user_group ug
WHERE ug.user_id = 83 AND g.group_id = ug.group_id ORDER BY g.group_type DESC, ug.user_pending ASC,
g.group_name BACKTRACE FILE: includes/db/mysql.php LINE: 158 CALL: dbal->sql_error() FILE:
includes/acp/acp_users.php LINE: 1881 CALL: dbal_mysql->sql_query() FILE:
includes/functions_module.php LINE: 471 CALL: acp_users->main() FILE: adm/index.php LINE: 74 CALL:
p_master->l....
Error 28 (on Phpmyadmin)
What does this error message mean? (6) I have a shopping cart system on my website. It always worked before, but all of a sudden, when I
try to access it i get "Got error 28 from storage engine". Has that got something to do with the
recent problems again, or can someone tell me what this error message means? Thanks. After posting
this I noticed I cannot get into my PHPAdmin anymore. It gives loads of errors: QUOTE Warning:
session_write_close() : SQLite: session write query failed: database is full in
/usr/local/cpanel/base/3rdparty/phpMyAdmin/index.php on line 42 Warning: session_write_close() :
Fai....
Page Load Error When Accessing Cpanel
(0) Not sure what the issue is. I cannot even load up any of the cpanel's to allow me to put in a
password. I have tried the link that is located in the Credit System 2.0 I have tried the links
with subdomain/cpanel I have tried the links with subdomain:2082 All 3 of these just give page
load errors. Please note : This isn't a "my password doesn't work" thread. This is a "I
can't even get cpanel to TRY to load" thread. Thanks in advance.....
Coppermine Gallery Error
(2) Okay.. so i have my gallery set up at photos.chantellepaige.org and everytime i try to access it i
get this error "Coppermine critical error: Unable to connect to database ! MySQL said: Access
denied for user 'giselle_copp1'@'localhost' (using password: YES)" how do i change
the password etc?? or fix the problem??....
Cannot Open Display - Error
(2) I basically have some problems in accessing xWindow applications(SAS and nedit in particular) in the
server. i get "Cannot open display" when i try to access nedit and other applications. I did some
findings on this and thought this might be of some help to you. But I was not able to zero in on
the problem yet. The problem I guess, is the remote not able to enable the display to the server.
The display settings has to be set properly in the remote machine. Commands I tried
setenv DISPLAY xhost + DISPLAY=gl5705rk02:10.0 ....
Error
I REALLY NEED HELP! (0) Well .. I got a problem.. I got an error in the compiler.. Do you know where i can get JDK 5.0? ....
The True Story Of The Internet (without Error)
video about the development of Internet (0) first of all I didn't meant to spam but there was an error with the previous post so I have
posted it again The true story of the Internet was name of the video I watched on
Discovery channel, and since it's an interesting video so I have decided to share it with you...
It talks about the development of the Internet and it makes an Interview with important site owners
such as facebook ,you tube and e b a y The video is divided into 5
parts... I do recommend watching it. /biggrin.gif" style="vertical-align:middl....
Mysql Error
(3) ok i need some more help from the wonderful coders here at Trap. I'm almost done with my CMS
script, but i'm having a problem with the installer.php file, when it trys to inseret the user
data into the database i keep getting the following error: CODE mySQL Error: You have an
error in your SQL syntax; check the manual that corresponds to your MySQL server version for the
right syntax to use near ';INSERT INTO `members` (`id`, `name`,
`username`, `password`, `email`, `title`) ' at lin....
A Recurring Error
(7) I have a laptop and a Desktop. On the desktop computer XP was installed. after about a month or two
I keep getting a message along with a Blue Screen Of Death saying "Unmountable boot volume" and it
won't boot windows Therefore I do a clean install of windows. This error has gotten more
frequent, and I've given up on windows for the time being on that machine. Because it keeps
happening is it a hardware problem? It happened after I installed a 2nd Hard Drive. Thanks....
Phpmyadmin Error [resolved]
(7) I get this error message each time I attempt to work phpMyAdmin. QUOTE Cannot start session
without errors, please check errors given in your PHP and/or webserver log file and configure your
PHP installation properly. Help would be very grateful.....
Phpmyadmin Error
Not able to enter PhpMyAdmin (4) Currently I try to access my PhpMyAdmin and I get the following error displayed among the screen:
My PhpMyAdmin worked prior the migration but suddenly stopped working after. I wanted to know if
anyone else is getting this error also or anyway can help me fix this o.o.....
Sites Down After The Upgrade
Server not found error (8) This is regarding the support ticket RZS-462155. I believe all the servers went offline when the
upgrade/migration was being performed. Early my morning, I was told that it would return to normal
with in 6 hours or so. I checked again and my sites hosted at ComputingHost.com ( www.wisetome.com
, kalaalog.com and couple more) are still coming back as "Server not found" on the browsers. More
than 12 hours had passed when I tried the Online support. A person 'D.J' responded saying
that the upgrades/migrations were complete, but my sites were still not up. He jus....
Mysqli Error - Phpbb3
(3) Ok, my forum (phpbb3) works but sometimes it displays this message CODE General Error SQL ERROR
[ mysqli ] Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2) [2002] An sql error occurred while fetching
this page. Please contact an administrator if this problem persists. This normally happens about
once a week for about 2 minutes but it is really getting annoying. I installed phpbb3 fine, it
didn't show any errors. But the main thing is that before this happens normally I can't
connect....
Site Error For Php Pages
Needs to Be Fixed Immediately (6) My site has been using Qupis for over a month now, and a few of my pages are php files. My site has
been operating properly until today. My html pages are working properly, but all of my php pages
are giving me the following errors. QUOTE Warning: Unknown: open_basedir restriction in effect.
File(/home/disneyre/public_html/info.php) is not within the allowed path(s): (1) in Unknown on line
0 Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0 Fatal
error: Unknown: Failed opening required '/home/disneyre/public_html/info.php&....
Install Error
(4) Hi. I'm Wade Patel. I'm bought HiveMail, and I'm trying to install it on my website. I
uploaded all files, as they said in the Install Instructions. When I open
"http://www.domain.com/mail/install/index.php/" I get this error: QUOTE Fatal error: Cannot
redeclare hash_update() in /home/dtat/public_html/mail/includes/functions.php on line 58 I saw the
topic of the PHP Error, you guys said I change require to require_once. I already have it
require_once. Here's my function.php line 58: QUOTE // Updates a hash record either by ID
or value and may....
Error While Activating Account
(10) Hello, I was signing up for an account, and it sent me an email with a link to follow to activate
my account and when i cliked on the link i got the following: QUOTE(error message) 404 :: Neave
Not Found Whatever you were looking for, it ain't here. Sorry about that. 2006
Imagefilez.com :: www.imagefilez.com the link that was sent in the email is
http://www.imagefilez.com/validate.php?ses...3e6cffc8c1bd2bb ....
Error E74? (xbox 360)
(7) Okay so me and my friend were playing guitar hero and all of a sudden the screen got all block like
and the graphics all turned into green swirly squares. So we thought maybe the A/v cord was loose or
something i turned off the xbox and re-plugged the a/v cords in now every time i turn the xbox on it
flashes 1 red light and says Error E74 in about every language i know of... I have called
1-800-4myxbox and all they said is that they only fix xbox's with the 3 red light error.... what
do i do? thanks.....
Command And Conquer Error When Downloading
(2) I recently bought Command & Conquer: The first decade (the multi pack) and began downloading it but
in the middle it stopped and came up with this message: CRC error: The file C:\Program
Files\EA Games\Command & Conquer Red Alert II\RA2\ra2.mix doesnt match the
file in the setups .cab file. The medium from which you are running the setup may be corrupted;
contact your software vendor. What should i do? I have Microsoft Windows XP professional and vista
/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" ....
Error Code In Subscriptions Page
problems subscribing to topics (5) I'm seeing some weird warning message show up at the top of my page when I go into "my
controls," then load my topic subscriptions page. At the top of the page, the following code appears
several times: IPB WARNING in_array() : Wrong datatype for second argument (Line: 2711 of
/sources/action_public/usercp.php) I'm guessing maybe that has something to do with the fact
I'm having problems subscribing to my topics and posts? Thanks in advance for your help.....
Generic Host Error
Anyone know how to fix it? (7) I've been receiving this errors for months and it seems not get get fixed... I'm using
Windows XP SP2 Home edition... CODE Generic Host Process for Win32 Services encountered a
problem and needed to close. I've tried whatever I can do, googling it, reading almost
everything possible and this error seems to be keep poping out everytime after I get my computer
started and my sound driver seems not to be working after that... I've even tried the hotfix
provided by Microsoft and kept my laptop up to date with the Windows Update and this error seems t....
Psp Error- Tut On How To Fix
When you try to use the internet does your psp get an internal error? (28) First of all, psp can browse the internet with its simple browser. BUT! What you may not know
is that there is a bug where when you try to search or use a wireless lan connection (WLAN) the psp
may say something like: Internal Error (80410A0B) To fix this without any memory loss, take out
the UMD which is in the psp, and also take out the memory card. Next, go to settings, then system
settings and click restore settings, the psp may freeze up, but it is not broken, take out the
batter pack and put it back in, the settings should be restored and all should work.....
Error Installing Civilization Iv
Can anyone tell me what this means? (4) Hey, guys. I recently received Civilization IV as a gift. Yesterday, I tried to install the game
and ran into a problem. The game comes as a two disc set and both discs are necessary for the
installation process. Well, I put in the first CD and followed the steps properly. Halfway through
the installation it told me to replace CD 1 with the second CD. I did this and it continued to
install. Right before the installation completed, I received an error from the game. I received
the following: (click thumbnail) Can anyone tell me what this means? Has anyone ....
Parse: Error Unexpected T_lnumber
php parse error when running script (4) Hi. I've just created a php script. The main object of the script is to delete some old files
and replace it with a new file with some new content, effectively moving the contents from one file
to another. These are the first 50 lines of the file: /* Calculate For The "A" Group - The
Latest Games ID */ $a_B = 002; while(file_exists("a_" . $a_B . ".dat")) {
$a_B++; } $new_page_contents = " " . $_POST . " " . $_POST . "
include \"/home/cmatcme/public_html/footer.php\"; ?> "; $a_stream = fopen(&....
Gmail: 502 Server Error
GMail: 502 Server Error (20) Hey The topic name says it all. Well I have been trying for the last half an hour to log into my
GMail account, but it kept on occuring a Server 502 error. Just wondering if it is just me
or....yeah. QUOTE Server Error The server encountered a temporary error and could not complete
your request. Please try again in 30 seconds. Yep I have tried every minute..for the last half
an hour...(The Time now is 12.13pm Australian Eastern Standard Time) ....
Operating System Not Found
Error Displayed On Start Up (13) So I've been having some difficulties with my Laptop computer. Not the least significant of
them was this problem of not being able to find the O/S. What to do about it? How does the
computer not find the Operating System? I know that it is in there someplace, I had just
re-installed it, but the BIOS was not able to locate it. On the phone to the Manufacturer's
Help Centre. Explain the problem. Real nice guy. Had the answer right handy. Send me an email right
away. Good thing I had another machine available,huh? On startup, the powering on of the machine
tri....
403 Forbidden Error When Accessing My Site
(11) umm this is a problem that i have been looking in other topics to try to fix but i can't seem to
find a answer to what i lookin for. I got my site workin again the other day ok and so i went on to
see it (so i can make more changes) and when i got there i got this QUOTE Forbidden You
don't have permission to access / on this server. Additionally, a 403 Forbidden error was
encountered while trying to use an ErrorDocument to handle the request. Apache/1.3.33 Server at
www.clansga.trap17.com Port 80 now i looked at everything and i can't seem to find t....
Error Installing Windows Xp -error 7 Ntkrnlmp.exe
(10) i have tried to install windows xp on my pc and i get an error right after it ask at the bottom of
the screen to press f2 to restore an error pops up saying FILE
\$win_nt$.~bt\NTKRNLMP.EXE cannot be open error 7 setup cannot complete and has
to close i have had windows xp on the pc before so i know its compatible but i used a different
version of windows before ,this tinme im using a new one and i get this error i seem to find no
solution anywhere about how to resolve this and I was wondering if possible theres something i need
to do,I am not to sm....
Error Not A Valid Win32 Application
(10) I get this error message when I try to open some files for example
C:\Downloads\Games\James_Bond_007 is not a valid win32 application or some other
files the error message is always "is not a valid win32 application" What can I do to open these
files so that the error message does not come up? How can I open this kind of file? I am using
Windows Me Pentium 4 1.3 Gigs 256 dram....
Looking for devc, error
|
|
Searching Video's for devc, error
|
advertisement
|
|