0

C++ header file

what will header file for this error const char*

2nd Aug 2017, 9:28 PM
Nirmal Kumar Sharma
Nirmal Kumar Sharma - avatar
37 ответов
+ 8
There is a list of formats you can use with printf here http://www.cplusplus.com/reference/cstdio/printf/
2nd Aug 2017, 10:15 PM
jay
jay - avatar
+ 8
the " that was used was odd. it looked like an accent not a quotation. the error on line 5 looks like it is from the blank include
2nd Aug 2017, 10:28 PM
jay
jay - avatar
+ 8
see the code in either James or my link (Blah or butItWorks) compare them to yours. Look for differences. Every character is important
2nd Aug 2017, 10:33 PM
jay
jay - avatar
+ 7
😯 yours was good too. printf is c more than c++ (cout) so technically yours is better
2nd Aug 2017, 10:36 PM
jay
jay - avatar
+ 7
I havent used it all that often. can it be used in conjunction with ios formatting? (width, left, right etc)
2nd Aug 2017, 10:39 PM
jay
jay - avatar
+ 6
maybe your " " I have updated the code to the printf version for your viewing pleasure. Note: Missing elements. <cstdio>, using namespace std, a ; the wrong quotation marks inside printf and the variable z in printf
2nd Aug 2017, 10:21 PM
jay
jay - avatar
+ 6
i really must start a c course soon. 😉
2nd Aug 2017, 10:48 PM
jay
jay - avatar
+ 6
hehehe I can't hear that word without thinking Borg.
2nd Aug 2017, 11:18 PM
jay
jay - avatar
+ 3
ok
2nd Aug 2017, 10:27 PM
Nirmal Kumar Sharma
Nirmal Kumar Sharma - avatar
+ 2
thanks jay
2nd Aug 2017, 10:40 PM
Nirmal Kumar Sharma
Nirmal Kumar Sharma - avatar
+ 2
thanks james
2nd Aug 2017, 10:40 PM
Nirmal Kumar Sharma
Nirmal Kumar Sharma - avatar
+ 1
I am coding for simple adding of two numbers and when I started to run the program I am getting error that is const char*
2nd Aug 2017, 9:43 PM
Nirmal Kumar Sharma
Nirmal Kumar Sharma - avatar
+ 1
then what will I do for correction in this error const char*
2nd Aug 2017, 9:44 PM
Nirmal Kumar Sharma
Nirmal Kumar Sharma - avatar
+ 1
no, how to link the code
2nd Aug 2017, 9:47 PM
Nirmal Kumar Sharma
Nirmal Kumar Sharma - avatar
+ 1
I am using only int not char
2nd Aug 2017, 9:51 PM
Nirmal Kumar Sharma
Nirmal Kumar Sharma - avatar
+ 1
will you get a pic. by me for this error
2nd Aug 2017, 9:54 PM
Nirmal Kumar Sharma
Nirmal Kumar Sharma - avatar
+ 1
ya ok
2nd Aug 2017, 9:55 PM
Nirmal Kumar Sharma
Nirmal Kumar Sharma - avatar
+ 1
#include int main() { int x = 2; int y = 4; int z = x + y; printf(“%ld the sum of z and y is z”) }
2nd Aug 2017, 9:56 PM
Nirmal Kumar Sharma
Nirmal Kumar Sharma - avatar
+ 1
what will do a output of sum of x and y
2nd Aug 2017, 9:58 PM
Nirmal Kumar Sharma
Nirmal Kumar Sharma - avatar