3 Replies - 993 Views - Last Post: 27 October 2006 - 10:02 PM Rate Topic: -----

#1 eudos  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 58
  • Joined: 23-April 06

Printing including " " and / characters

Posted 27 October 2006 - 08:34 PM

Hi

I am trying to print a simple thing in C++. but it contains " " and a / character..so as this charcters are used in the code..How do i print this things..

here is what i am trying to print.

int i;

   for (i=0; i<MAX; i++){
	  printf(" "images/Europe_%d.gif", " ,i );
   }

// I need to print this part including characters "images/Europe_%d.gif",




Can somebody plz help me..
thanks

Is This A Good Question/Topic? 0
  • +

Replies To: Printing including " " and / characters

#2 Xing  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 19
  • View blog
  • Posts: 725
  • Joined: 22-July 06

Re: Printing including " " and / characters

Posted 27 October 2006 - 08:54 PM

printf("\"");
printf("/");

Was This Post Helpful? 0
  • +
  • -

#3 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: Printing including " " and / characters

Posted 27 October 2006 - 08:54 PM

http://www.cpprefere..._sequences.html

You need to use escape sequences to utilize those characters, so for the double quote its \"
Was This Post Helpful? 0
  • +
  • -

#4 eudos  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 58
  • Joined: 23-April 06

Re: Printing including " " and / characters

Posted 27 October 2006 - 10:02 PM

Thank U ..it works :D
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1