Sponsored Content
Top Forums Programming execution small C++ program in UNIX Post 302137124 by porter on Saturday 22nd of September 2007 09:26:08 AM
Old 09-22-2007
You changed what to 555? Have you compiled this?

Code:
$ g++ c.cpp
In file included from /usr/include/c++/3.2.3/backward/iostream.h:31,
                 from c.cpp:1:
/usr/include/c++/3.2.3/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

help me do a small program!! THX

Write a shell script (to run on the Bourne shell) that runs an infinite loop to check every 5 seconds to report on who logs into and who logs out of a UNIX system. Without loss of practical significance of this little utility, we can ignore multiple logins from the same user during a time period of... (1 Reply)
Discussion started by: lydragon
1 Replies

2. Linux

unix command for multifile program execution

how can I compile and execute multifile program in unix os.:o (0 Replies)
Discussion started by: alokmishra8
0 Replies

3. Programming

A program to trace execution of another program

Hi, I wanted to know if i can write a program using switches and signals, etc to trace execution of other unix program which calls c program internally. If yes how? If not with signals and switches then are there any other methods apart from debugging with gdb/dbx. (3 Replies)
Discussion started by: jiten_hegde
3 Replies

4. UNIX for Dummies Questions & Answers

Small Program with variables

Hello Geniuses of the unix world. please help, stupid chemist. I have the following script that I need to create a file. Doesnt make sense unless i explain this way: I need to create a file called summary.in I would like all these lines to be inserted however in the command line I would like the... (1 Reply)
Discussion started by: gingburg
1 Replies

5. Programming

Debugging Program during execution

I have made use of 'valgrind' and -finstrument-functions compiler option for debugging / analyzing code. Both the options lets us know the line / file being executed to some extent. Is there a generic way that lets program dump the file:line it is getting executed dumped to a log file during... (3 Replies)
Discussion started by: uunniixx
3 Replies

6. Shell Programming and Scripting

main program is not calling small other programs

I am trying to understand a program in a book and this program suppose to call other programs which are in the same folder, the other programs are called 'lu' and 'add' but for some reason when it gets to the last line of each case to call these programs there is an error message saying ./rolo:... (2 Replies)
Discussion started by: bartsimpsong
2 Replies

7. Programming

Help with C++ program execution.

//Find the root of the equation (x^2)-2 by bisection method. #include<iostream> using namespace std; double a,x; double f(double x) { return ((x*x)-2); } //Suppose the function is (x*x)-2. void calcx(double a1,double b1) { x =... (2 Replies)
Discussion started by: poonam.gaigole
2 Replies

8. Shell Programming and Scripting

Execution of compressed program

I need UNIX scripts for polling, Uncompressing files and moving files between directory. Also trying to save file paths and any other variables in an independent file (.env) and use these at runtime by executing this file in the main script. (3 Replies)
Discussion started by: new2script
3 Replies

9. Homework & Coursework Questions

Small Grading Program

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: 1. Create a series of commands for a grading program. Create a grades file. Put a "tab" between the name and... (7 Replies)
Discussion started by: Jagst3r21
7 Replies

10. Shell Programming and Scripting

Making a bash script and small C program for a homework assignment

Here's the assignment. I'll bold the parts that are rough for me. Unfortunately, that's quite a bit lol. The syntax is, of course, where my issues lie, for the most part. I don't have a lot of programming experience at all :/. I'd post what I've already done, but I'm so lost I really don't know... (1 Reply)
Discussion started by: twk101
1 Replies
cdk_compat(3)						     Library Functions Manual						     cdk_compat(3)

NAME
cdk_compat - Cdk4 compatibility functions SYNOPSIS
SYNOPSIS
cc [ flag ... ] file ... -lcdk [ library ... ] #include <cdk_compat.h> int getDirectoryContents ( char *directory, char **list, int maxListSize); int readFile ( char *filename, char **info, int maxlines); int splitString ( char *string, char **items, char splitChar); DESCRIPTION
These functions and macros make it simpler to port applications from the older Cdk4 library to Cdk5. A few functions are deprecated in Cdk5, because they rely upon the caller to know in advance the size of data which will be returned by the function. Additionally, some macros are deprecated because they serve no realistic purpose: they have direct (standard) equivalents in all modern curses implementations. Finally, a few macro definitions are added to iron out naming inconsistencies across the Cdk4 header files. AVAILABLE FUNCTIONS
getDirectoryContents This opens the current directory and reads the contents. Use CDKgetDirectoryContents() in new code. readFile This reads a file and sticks it into the char ** provided. Use CDKreadFile() for new code. splitString This splits a string into one or more parts given the split character. Use CDKsplitString() for new code. EXAMPLE
Start the porting process by changing the #include's to use #include <cdk_compat.h> rather than #include <cdk.h> Some adjustments of course are needed to make your compiler see the compatibility header file. A separate name was chosen so that it in turn can (by adjusting the include path) include either the old Cdk4 cdk.h or the new. If the old is included, you should link your pro- gram against the old library. Likewise, including the new requires that you link against the new library. That is the first step: making your program compile using the compatibility header file using the old headers and library. The next step is to get it to compile against the new headers and library. Most of the changes will require modifying bare references to certain pointers to wrap them with the ObjOf() and ScreenOf() macros. New Cdk uses these to provide functions which are easily shared among the different widget types. Your compiler should be able to tell you where the changes should be made. See the example programs which are included with Cdk as a guide. That is the hard part of porting. But even for a large program, the changes can be made simply: there are not that many types of change to make. At the end of this step, you should still be able to build and run your program against the old headers and library. It is reason- ably likely that you can do the same with the new headers and library. By using the same source for old/new versions of Cdk, you can test and verify that your program still works properly after these modifications. Finally, unless this is a purely academic exercise, you will want to remove references to the deprecated functions and macros. SEE ALSO
cdk_objs (3), cdk_util (3) cdk_compat(3)
All times are GMT -4. The time now is 06:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy