Advertisement

05.14.2003 at 06:13PM PDT, ID: 20616715
[x]
Attachment Details

Casting int to char*

Asked by downatone in C Programming Language

Tags: int, casting, char

I'm probally missing something simple. But can't seem to get this and need to go to bed, so will assume someone will provide a solid answer by the morning!
Need to:
casting an int to a char*
-- ex. 2367 (as an int) -> '2367' (as a char) --
I need this because

iSum is an int (ex. 22567)
//need to cast the in into a char pointer!!!
myStruct.createdNewFilePointer = fopen(iSum,"w");

I can't open it this way because it requires a char*
Any thoughts, on this probally/hopefully very simple question?
cheers
DavidStart Free Trial
 
Loading Advertisement...
 
[+][-]05.14.2003 at 06:16PM PDT, ID: 8528823

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: C Programming Language
Tags: int, casting, char
Sign Up Now!
Solution Provided By: ScratXP
Participating Experts: 3
Solution Grade: A
 
 
[+][-]05.14.2003 at 06:25PM PDT, ID: 8528851

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.15.2003 at 02:17AM PDT, ID: 8530959

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2003 at 02:21AM PDT, ID: 8530970

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.06.2004 at 12:36PM PST, ID: 10293456

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.11.2004 at 04:04PM PST, ID: 10337663

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32