Sponsored Content
Top Forums Programming Trubble in executing the cpp program... Post 302249426 by calv on Tuesday 21st of October 2008 10:04:02 AM
Old 10-21-2008
Quote:
Originally Posted by fpmurphy
May also be related to the fact that Host, Database, etc. should probably be declared as (const char *).
Well, I don't think so. Passing a "char*" to a function that expects "const char*" is perfectly legal. And if it wasn't, then the compiler would say so.

On the other hand, if the function would in fact require a "char*" it might expect the value to be writable, which is not the case for string literals. But I don't think that is the case here.

Also, the meaning of the message "terminate called after throwing an instance of 'char const*'" is pretty clear.
 

10 More Discussions You Might Find Interesting

1. Programming

executing a program within a program

Read the title: how do i do it? (4 Replies)
Discussion started by: Gekko
4 Replies

2. UNIX for Dummies Questions & Answers

executing the su command from a java program.

Say in unix (AIX) m/c, I am logged in with s1 user and want to start process p1 with user credentials of s2. I can do manually in this way: #su - s2 #enter password for s2> somePassword $ p1 But all this I have to do through a java program. How to pass the password through program. One... (1 Reply)
Discussion started by: shailendrat
1 Replies

3. Programming

Executing an .ec program in different informix versions

Hi all, I tried writing an .ec program connecting to informix database from solaris platform Sun 5.7 informix version that i had to used when i compiled the program was 9.21.UC3 the binary when i ported solaris box with informix version 9.40.UC5 i am unable to run that i am encountering... (0 Replies)
Discussion started by: matrixmadhan
0 Replies

4. Shell Programming and Scripting

convert cpp program to c shell script ?

Hi guys I tried to convert this c++ code to c shell script but there are some bugs and I don't know how to solve it. This code prints the three variables in decreasing order: int main() { int x,y,z; cin >> x >> y >>z; if ( x < y ) if ( x < z ) if ( y < z ) cout << x <<" " <<... (2 Replies)
Discussion started by: domain
2 Replies

5. Solaris

How to know the size of the program currently executing in memory

hey everybody, i am currently working on solaris 10 os on a m5000 server. my problem is when i want the exact size of a program in execution, i am unable to do it. earlier i thought the RSS field of prstat but because of its large size it cant be the size. pmap -x shows some output but it includes... (2 Replies)
Discussion started by: aryansheikh
2 Replies

6. Shell Programming and Scripting

Executing a Java Program

I am entirely new to shell scripting and would like to create a script to execute a java program called Main. I've already compiled it and placed the .java and .class files at /root/javaTest. Next I made a shell script that simply contained: java /root/javaTest/Main . I made the script... (2 Replies)
Discussion started by: hypnotic_meat
2 Replies

7. Shell Programming and Scripting

Executing WIN32OLE program

Hello, Please help me out to execute this perl program: #!/usr/bin/perl -w use strict; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; $Win32::OLE::Warn = 3; # die on errors... # get already active Excel application or open new my... (6 Replies)
Discussion started by: suvenduperl
6 Replies

8. UNIX for Dummies Questions & Answers

executing a different program

What system calls or commands do I need to use in order to execute a different program from an already running process? (1 Reply)
Discussion started by: justOne21
1 Replies

9. Programming

Error with shared lIBMpi.so.1 when compiling CPP program

Hello, Met a problem when compiling a C++ program from source code without error, but when ran it there was always an error message: ./Ray: error while loading shared libraries: libmpi_cxx.so.1: cannot open shared object file: No such file or directoryAs the error points to openmpi which was... (0 Replies)
Discussion started by: yifangt
0 Replies

10. Programming

Error in executing the C program

Hello Friends, I have written a code for the unisex bathroom which makes a policy that when a woman is in the bathroom only other women may enter, but not men, and vice versa. This program consists of four functions which a user defines but these functions are not properly working while... (4 Replies)
Discussion started by: Ravi Tej
4 Replies
cc_string(3)							       Coin							      cc_string(3)

NAME
cc_string - The cc_string type is a C ADT for ASCII string management. This is a Coin extension. SYNOPSIS
#include <Inventor/C/base/string.h> Public Attributes char * pointer size_t bufsize char buffer [CC_STRING_MIN_SIZE] Related Functions (Note that these are not member functions.) void cc_string_remove_substring (cc_string *me, int start, int end) void cc_string_construct (cc_string *me) cc_string * cc_string_construct_new (void) cc_string * cc_string_clone (const cc_string *string) void cc_string_clean (cc_string *string_struct) void cc_string_destruct (cc_string *me) void cc_string_set_text (cc_string *me, const char *text) void cc_string_set_subtext (cc_string *me, const char *text, int start, int end) void cc_string_set_integer (cc_string *me, int integer) void cc_string_set_string (cc_string *me, const cc_string *string) void cc_string_append_string (cc_string *me, const cc_string *string) void cc_string_append_text (cc_string *me, const char *text) void cc_string_append_integer (cc_string *me, const int digits) void cc_string_append_char (cc_string *me, const char c) unsigned int cc_string_length (const cc_string *me) void cc_string_clear (cc_string *me) void cc_string_clear_no_free (cc_string *me) uint32_t cc_string_hash_text (const char *text) uint32_t cc_string_hash (const cc_string *me) const char * cc_string_get_text (const cc_string *me) int cc_string_is (const cc_string *me) int cc_string_compare (const cc_string *lhs, const cc_string *rhs) int cc_string_compare_text (const char *lhs, const char *rhs) int cc_string_compare_subtext (const cc_string *me, const char *text, int offset) void cc_string_apply (cc_string *string, cc_apply_f function) void cc_string_sprintf (cc_string *me, const char *formatstr,...) void cc_string_vsprintf (cc_string *me, const char *formatstr, va_list args) Detailed Description The cc_string type is a C ADT for ASCII string management. This is a Coin extension. Author Generated automatically by Doxygen for Coin from the source code. Version 3.1.3 Wed May 23 2012 cc_string(3)
All times are GMT -4. The time now is 06:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy