Devc++ Error

free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > C/C++ Programming

Devc++ Error

htdefiant
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
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. biggrin.gif

 

 

 


Reply

htdefiant
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
I recopied the extended libraries just to make sure I had the correct ones. I got a new error list.

Reply

osknockout
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:

smile.gif 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
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
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. smile.gif

Reply

htdefiant
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
Alright. ^^ Well, in case I ever need anything, I'll know who to contact cool.gif

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. extlibnew.zip - 5.11 hr back. (1)
  2. devc and string.h - 582.15 hr back. (1)
Similar Topics

Keywords : devc, error

  1. Error Installing Template In Joomla! 1.5.7
    (0)
  2. Flex Error #1034: Type Coercion Failed: Cannot Convert Mx.managers
    (1)
    Hi Boosters am created below flex module and then include this module to one mxml application .
    after that i run that mxml file , its showing combobox successfully. But if i click that combobox
    then , following error displayed. anyone know the solution, pls post it. CODE <!--
    test.mxml --> <mx:Module
    xmlns:mx="http://www.adobe.com/2006/mxml"  layout="absolute">  
        <mx:ComboBox x="199" y="80" width="140">
        <mx:dataProvider>             <mx:Array>      ....
  3. Linux/ Apache /mod_rewrite Issue
    Error when accessing a file (4)
    running on Ubuntu 8.04 with an XAMPP - php5.2.5, Apache 2., etc Getting this error when I try to
    access an sNews CMS which requires mod_rewrite and is installed locally: QUOTE Apache/2.2.8
    (Unix) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8e PHP/5.2.5 mod_apreq2-20051231/2.6.0 mod_perl/2.0.2
    Perl/v5.10.0 configured -- resuming normal operations /opt/lampp/htdocs/jim/snews/.htaccess:
    RewriteBase: argument is not a valid URL /opt/lampp/htdocs/jim/snews/.htaccess: RewriteBase:
    argument is not a valid URL Using this link: http://localhost/jim/snews/snews16_ema....
  4. An XSL Transform Error
    Who knows how to fix it? (2)
    Wel i am working on my project and i am testing some things out with rss feeds, link to site when
    i look at my site i'll see the following error in my feed panels : QUOTE MM_XSLTransform
    error. The server could not perform the XSL transformation because an XSLT processor for PHP could
    not be found. Contact your server administrator and ask them to install an XSLT processor for PHP.
    When i googled this error i got the this: Change in your php.ini: ;extension=php_xsl.dll to:
    extension=php_xsl.dll So is this possibible on trap17 or do i have to ask a a....
  5. Page Load Error When Trying To Get Into Control Panel
    I just changed domain (2)
    I had put a domain name that I didn't have when I registered my website. I got the 15 credits
    and changed it to a subdomain. Now I can't log into my control panel. At first it was telling me
    I had the wrong password which I'm sure I don't. Now I just get a timed out error. Also my
    confirmation email for changing my domain was kinda blank. QUOTE Hi, This mail is to notify
    you that your domain has been changed to : Regards, trap17.com So yeah... any help? EDIT:
    Also I don't see my request to change domain the proper forum I had attempte....
  6. An Error Thought I'd Let The Admins Know About.
    Bad link. (4)
    Upon my creation with the forums, I noticed that I got a little info box almost at the top, telling
    me my credit value towards obtaining the free default package hosting. Upon reading this I noticed
    that the last paragraph with "computer hosting" the link to there site is not working. Clicked it a
    few times just to make sure it wasn't my connection. Unfortunately it isn't. I just thought
    I could help out with that, as its not exactly working, and I am some what interested in it. ^.^
    Thank you and take care. /smile.gif" style="vertical-align:middle" emoid=":)"....
  7. Mysql Db Is Down Getting Following Error
    (2)
    My Mysql is Down can I get some help please? Appreciate it. Patrick Domain: patrickcurl.com Error:
    phpMyAdmin - Error #2002 - The server is not responding (or the local MySQL server's socket is
    not correctly configured)....
  8. Hosting Problem [resolved]
    403 Forbidden Error occurs whenever I try to access my site (22)
    First off, let me say that I have spent considerable effort and time going through the forums
    seeking solutions for this problem. I have even gone as far as to seek help from the Xisto Live
    support team (they suggested I wait 2 hours and then get back to them. Well I did that, and there
    has been no change, and live support is now down). I've also tried changing permissions on both
    files and folders via Cpanel, but to no avail. I still end up with the same error: QUOTE
    Forbidden You don't have permission to access /index.php on this server. Additionally, a 4....
  9. Wordpress Error - Bytes Exausted [resolved]
    NextGEN Gallery (7)
    Hey, I have just gotten my blog up and migrated it from my own webserver. I have fixed up most
    problems but one issue remains. When I try to upload an image to NextGEN Gallery I get and error
    when it tries to generate a thumbnail. QUOTE Fatal error: Allowed memory size of 33554432 bytes
    exhausted (tried to allocate 1992 bytes) in
    /home/samlock/public_html/wp-content/plugins/nextgen-gallery/lib/thumbnail.inc.php on line 183
    It does it for EVERY image size, so it's not because of a big image. Help, please.....
  10. 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
    !!!!!....
  11. 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....
  12. Error 28 (on Phpmyadmin)
    What does this error message mean? (10)
    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....
  13. 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.....
  14. 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??....
  15. 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 ....
  16. 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? ....
  17. 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....
  18. 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....
  19. 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 ....
  20. Error E74? (xbox 360)
    (11)
    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.....
  21. Generic Host Error
    Anyone know how to fix it? (10)
    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....
  22. Psp Error- Tut On How To Fix
    When you try to use the internet does your psp get an internal error? (31)
    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.....
  23. Connection Error 800a0e7a On Win Server 2003 X64
    (1)
    We have just set up a Windows Server 2003 x64 system for the purposes of being a dedicated web
    server/media streaming server. Up to this point, we have been using Windows Server 2003 x86
    environment and everything is running well. I have migrated the IIS settings over to the new server
    and all appears to be going well when tested except that I have now lost all DB connectivity to the
    3 small Access databases that I have in the server. All permissions and set ups are the same.
    Based on past experience, I thought that it had to do with my Jet 4.0 drivers not being up t....
  24. Gmail: 502 Server Error
    GMail: 502 Server Error (22)
    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) ....
  25. 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....
  26. 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....
  27. Error Installing Windows Xp -error 7 Ntkrnlmp.exe
    (11)
    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....
  28. Virtual Memory Error... Windows Xp
    (5)
    Im tryin 2 Install an Ebook & when I click the "setup" file, itz givin an error sayin "This program
    requires at least 3MB of free Virtual Memory to run"... There r 3 partitions on the Disk Viz., C,
    E, F... The Page file size is set as "1536-3072 MB" for C Drive, but other Drives do not hav any
    Page File Size set... i've windows xp and win 2000 Plz help me wid thiz problem... Thanx, ....
  29. ---> Ftp Error Codes What They Mean <---
    (4)
    CODE FTP Error Messages some nice info about ftp error codes so you know what they mean. i am
    sure you see them all the time and sometimes you dont know what they mean, so take a look here. The
    most common codes: 421 - often means: too many users logged to the same account. 530 -
    wrong login:pass, some servers auto-switch to 530 from 421 when they reach the max # of users.
    so notice the error message attached to the code. 550 - common in Ratio site, If the file exsist it
    means you have no access to the file or dir. if you try changing dirs in an FTP ....
  30. 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....

    1. Looking for devc, error

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for devc, error

*MORE FROM TRAP17.COM*
Similar
Error Installing Template In Joomla! 1.5.7
Flex Error #1034: Type Coercion Failed: Cannot Convert Mx.managers
Linux/ Apache /mod_rewrite Issue - Error when accessing a file
An XSL Transform Error - Who knows how to fix it?
Page Load Error When Trying To Get Into Control Panel - I just changed domain
An Error Thought I'd Let The Admins Know About. - Bad link.
Mysql Db Is Down Getting Following Error
Hosting Problem [resolved] - 403 Forbidden Error occurs whenever I try to access my site
Wordpress Error - Bytes Exausted [resolved] - NextGEN Gallery
Help Me _ Error Message: "could Not Retrieve Session Record" - IPB-Forum error message
Phpbb3 - Error 28
Error 28 (on Phpmyadmin) - What does this error message mean?
Page Load Error When Accessing Cpanel
Coppermine Gallery Error
Cannot Open Display - Error
Error - I REALLY NEED HELP!
The True Story Of The Internet (without Error) - video about the development of Internet
Mysql Error
Error While Activating Account
Error E74? (xbox 360)
Generic Host Error - Anyone know how to fix it?
Psp Error- Tut On How To Fix - When you try to use the internet does your psp get an internal error?
Connection Error 800a0e7a On Win Server 2003 X64
Gmail: 502 Server Error - GMail: 502 Server Error
Operating System Not Found - Error Displayed On Start Up
403 Forbidden Error When Accessing My Site
Error Installing Windows Xp -error 7 Ntkrnlmp.exe
Virtual Memory Error... Windows Xp
---> Ftp Error Codes What They Mean <---
Error Not A Valid Win32 Application
advertisement



Devc++ Error



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE