- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 6
- Posts with Downvotes
- 4
- Downvoting Members
- 5
12 Posted Topics
[QUOTE=titan5;1385294]I need to create a large integer array but I am not able to increase its size beyond max int value. How do I create larger arrays?[/QUOTE] Do you know what is the size of the array? What compiler you are working on? [2/4/8 - bit compiler] If you are …
hi coil, try [B]sudo apt-get install build-essential[/B] try [B]which g++[/B] will give you the path to g++ binary. If this doesn't work, try [B]sudo apt-get install g++[/B] Hope this works[assuming your OS Ubuntu]. Cheers Sarma CSMG
Hi all, Here is a code snippet that is bugging me off for a while: [CODE] #define size (20 * 1024) unsigned char data_base[size]; /*my application here*/ ......... ......... ......... ......... [/CODE] The global variable "data_base" as you can see is uninitialized. The executable size was 434KB. when this variable …
Hi all, I want to add a route on Solaris machine for each IP I am pinging. I am added static route for each IP as here: [B]route add -net 10.116.80.21 -netmask 255.255.255.255 10.116.80.18[/B][interface id 10.116.80.21, gateway = 10.116.80.18] [B]route add -net 10.116.80.23 -netmask 255.255.255.255 10.116.80.18[/B] [B]route add -net 10.116.80.25 …
[CODE] #include <stdio.h> int main() { FILE* pFile = NULL; int nsid = 0; char lastname[255]; char filename[80]; float midterm = 0; float final = 0; float wavg = 0; char * decision; // asking the user to enter a filename, the file will read the conents printf("Please enter a …
Hi all, My directory setup is follows. * My project folder is dev/. * All source files are in src/ with respective names, i.e. buzzer.c in buzzer/, led.c in led/ , lcd.c in lcd/ ... * All headers are in inc/. * All compiled objects are in obj/. * The …
Here is the corrected code. [CODE] void reverseDisplay(int value) { [COLOR="Green"] if (value != 0)[/COLOR] // this is the correction. { if (value < 0){ cout << "-" << abs(value % 10); reverseDisplay(value / -10); } else { cout << value % 10; reverseDisplay(value / 10); } } } [/CODE] …
[CODE] if (username_1=usercheck) { ........ } if (password = password_1) { .......... } [/CODE] You have misplaced Assignment operator(=)! You must be using equality check operator(==). Try this: [CODE] if (username_1 == usercheck) { ........ } if (password == password_1) { .......... } [/CODE]
Here are some refs: [URL="http://www.tenouk.com/"]http://www.tenouk.com/[/URL] [URL="http://beej.us/"]http://beej.us/[/URL] Happy Reading!
Use index and rindex functions as given here and a little string handling can serve your purpose. [CODE] #define ERROR(X) printf("%s Failed\n", X) int main() { char *month; char *year; char *date = "dd-mm-yy"; month = index(date, '-'); if (month == NULL) ERROR("index"); year = rindex(date, '-'); if(year == NULL) …
[QUOTE=tennis;1127320]Struct Day { explicit Day(int d) : val(d) {} int val; }; what does the colon in the 3rd line means? [/QUOTE] I compiled this on my cygwin system and I got this error: [B]test.c:5: error: expected specifier-qualifier-list before ‘explicit’[/B] Here is what I tried [CODE] #include <stdio.h> struct day …
[CODE] const char *str1 = "pointer to constant"; [/CODE] str1 refers to a char which is constant(Read only) so you get this not working. [CODE]str1[0] = 'P'; // illegal![/CODE] [CODE] char *const str2 = "constant pointer"; [/CODE] str2 refers to a constant pointer to a char, here address is read …
The End.
csmgsarma