This is my code to programmatically save comment:
$comment = (object) array(
'nid' => $loaded_node->nid,
'cid' => 0,
'pid' => 0,
'uid' => $loaded_node->uid,
'mail' => $account->mail,
'thread' => '00/',
'created' => $loaded_node->created,
'changed' => $loaded_node->created,
'is_anonymous' => 0,
'homepage' => '',
'status' => COMMENT_PUBLISHED,
'subject' => $comment_body_subject,
'language' => $node_language,
'comment_body' => array(
$node_language => array(
0 => array (
'value' => $comment_body_value,
'format' => 'msg_filtered_html',
)
)
),
);
comment_submit($comment);
comment_save($comment);
I want to get the cid of comment just saved. How can I get that?