1,494 Posted Topics

Member Avatar for gerard4143

Have you read this? [url]http://arstechnica.com/open-source/news/2010/10/shuttleworth-unity-shell-will-be-default-desktop-in-ubuntu-1104.ars?utm_source=rss&utm_medium=rss&utm_campaign=rss[/url]

Member Avatar for madcSPYnX0420
0
170
Member Avatar for erogol

Your going about this the wrong way. Try using fgets() instead of fgetc(). [code] #include <stdio.h> #include <stdlib.h> #define STR_SIZE 10 int main(void) { FILE *fp; char ch[STR_SIZE]; int aInt; int bInt; fp = fopen("erogol.k","r"); fgets(ch, STR_SIZE, fp); aInt = atoi(ch); fgets(ch, STR_SIZE, fp); bInt = atoi(ch); printf("%d \n",bInt+aInt); return …

Member Avatar for gerard4143
0
4K
Member Avatar for lochnessmonster

[QUOTE=lochnessmonster;1471752]nice examples....but i fail to understand your paragraph :/ maybe u can dumb it down for me lol[/QUOTE] Templates don't support implicit conversions so they'll create a new functions/objects for each type, hence code bloat.

Member Avatar for L7Sqr
0
995
Member Avatar for assembly_11
Member Avatar for jkoske
0
77
Member Avatar for jugadengg

If think you should upgrade your compiler, its passing back mangled names in its error message. This, on line 81 [code] bool search(int roll,Node **current,Node **previous) [/code] Should be [code] bool list::search(int roll,Node **current,Node **previous) [/code]

Member Avatar for gerard4143
0
227
Member Avatar for gaviel080990

You'll find this an interesting read [url]http://www.daniweb.com/forums/thread90228.html[/url]

Member Avatar for Ancient Dragon
0
119
Member Avatar for <Tech>

Yes, if you take the proper courses..Here's a site you should check out. [url]http://dinosaur.compilertools.net/[/url]

Member Avatar for gerard4143
0
82
Member Avatar for Oblivious21
Member Avatar for Oblivious21
0
265
Member Avatar for lexusdominus
Member Avatar for Gregor97

I would read this sticky [url]http://www.daniweb.com/forums/thread70096.html[/url]

Member Avatar for alex55
0
140
Member Avatar for prvnkmr194

Narue beat me to the punch...Here's my simple solution [code] #include <stdio.h> #include <stdlib.h> #include <time.h> #define ARR_SIZE 16 #define LOW 0 #define HIGH 15 int mya[ARR_SIZE] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; int main(int argc, char**argv) { int …

Member Avatar for prvnkmr194
0
438
Member Avatar for lilsean67

This line [code] while(oneAccount.balance = 10) [/code] Do you really want to assign 10 to oneAccount.balance?

Member Avatar for lilsean67
0
116
Member Avatar for whodoes21

Now you have to check the characters of each line...checking for things like if, while, do and then check the last printable character to see if it is ';'.

Member Avatar for ravenous
0
2K
Member Avatar for Xytheron

Try something like below..I would go over the code because I wrote this quickly [code] #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <string.h> #define BUFFER_SIZE 25 #define READ_END 0 #define WRITE_END 1 int main(void) { char write_msg[BUFFER_SIZE] = "Greetings"; char read_msg[BUFFER_SIZE]; pid_t pid; int fd[2]; if (pipe(fd) == -1) { …

Member Avatar for charlybones
0
208
Member Avatar for fab2

[ICODE] As you can see in the function useLocal the value of variable x is set to 25;at the first call, its value is still 25, then is incresead of 1, and when it's called another time,its value is 26. Ok, so far so good!! [/ICODE] Are you sure about …

Member Avatar for fab2
0
219
Member Avatar for Xytheron

If I was to guest, I would investigate this line CFLAGS = $(NORMCFLAGS) What is NORMCFLAGS and is it compatible with g++?

Member Avatar for gerard4143
0
200
Member Avatar for rockerjhr
Member Avatar for elsiekins

Try reading this sticky [url]http://www.daniweb.com/forums/thread90228.html[/url]

Member Avatar for elsiekins
0
162
Member Avatar for amir malik

Google is your friend [url]http://www.cs.cmu.edu/~srini/15-441/F01.full/www/assignments/P2/htmlsim_split/node18.html[/url]

Member Avatar for amir malik
0
73
Member Avatar for mikecolistro

Never use gets, use fgets instead. From my help file BUGS Never use gets(). Because it is impossible to tell without knowing the data in advance how many characters gets() will read, and because gets() will continue to store characters past the end of the buffer, it is extremely dangerous …

Member Avatar for WaltP
0
133
Member Avatar for mackemforever

Your code doesn't make sense. Why are you using fgets() on floats? Try setting up like this. [code] #include <stdio.h> #define ARR_SIZE 5 int main() { float nums[ARR_SIZE]; int i = 0; for ( i = 0; i < ARR_SIZE; i++ ) { printf("\nEnter value %d:", i + 1); fscanf(stdin, …

Member Avatar for melisko
0
154
Member Avatar for Eagle4Ever

Here's a good link on how to become a hacker...well how to become a traditional hacker [url]http://www.catb.org/~esr/faqs/hacker-howto.html[/url]

Member Avatar for WaltP
0
221
Member Avatar for knight92

Maybe you should consider that most computer languages use C as its interface to the outside world. Why would a language so foreign to C use C as its interface? Well maybe C is a general representation of the machine...I'll probably get nailed for this general/simple statement.

Member Avatar for Adak
0
364
Member Avatar for jfunchio

Try reading your input a character at a time and checking that each one is a digit or a valid numeric symbol. [code] #include <stdio.h> #include <ctype.h> #include <stdlib.h> #define MULTI 10 int main(int argc, char**argv) { char ch[2]; int x = 0; ch[1] = '\0'; while ((ch[0] = fgetc(stdin)) …

Member Avatar for gerard4143
0
182
Member Avatar for hqrtt

When you pass a character array to scanf, you don't have to use the address of operator because the array name is the address of the array..Also the main function should be defined returning an int and i is used uninitialized on line line 41. [code] #include <stdlib.h> #include <stdio.h> …

Member Avatar for hqrtt
0
180
Member Avatar for tudorH
Member Avatar for dos_killer
Member Avatar for rcmango
Member Avatar for Akill10
0
118
Member Avatar for HeartBalloon

You can't us variables with case...It must be a integral constant. switch ( expression ) case constant-expression : statement [default : statement]

Member Avatar for HeartBalloon
0
177
Member Avatar for lochnessmonster

Here's one, passing arguments to a program with argv. [code] int main(int argc, char**argv) {} [/code]

Member Avatar for Ancient Dragon
0
96
Member Avatar for iamthesgt
Member Avatar for HeartBalloon

Try rewriting like so [code] for(temp=hl;(temp!=NULL) || (bOver1==true); temp=temp->next) [/code]

Member Avatar for HeartBalloon
0
168
Member Avatar for HeartBalloon

I think your function is flawed..passname should be returning or updating its member data not another object's member data. It would make more sense to have this. [code] class Customers{ private: char caName[kiArraySize]; //kiArraySize is 30 public: //this is what I need help for const char* passName() const; }; const …

Member Avatar for gerard4143
0
93
Member Avatar for Rimojenkins
Member Avatar for Rimojenkins
0
11K
Member Avatar for melisko

In this task you don't have remove the vowels just don't write them to the new file. Just be sure to read the input file one character at a time. If the character is a vowel the do nothing, if the character is not a vowel then write it to …

Member Avatar for melisko
0
139
Member Avatar for Rickay

I tried compiling your program and got these warnings In function ‘double lcm(double, double)’: 35: warning: no return statement in function returning non-void In function ‘bool isprime(long int)’: 47: warning: control reaches end of non-void function At global scope: 10: warning: ‘dividecounter’ defined but not used lcm should be returning …

Member Avatar for frogboy77
0
192
Member Avatar for petero_l

create your case like this [code] case '1': { //put code here } [/code] Use braces so you can define variables in your case.

Member Avatar for petero_l
0
253
Member Avatar for DJSAN10

[QUOTE=DJSAN10;1458528]Are constants, defined by using the keyword const , external linkage or internal linkage? Can constants be modified using pointers? What about constants defined using by #define?[/QUOTE] Can constants be modified? It really depends on what you mean by modified. Does that imply the use of memory management functions?

Member Avatar for DJSAN10
0
136
Member Avatar for Mayank23

Use getline(). Here's an example of usage. [url]http://www.cplusplus.com/reference/string/getline/[/url]

Member Avatar for Mayank23
0
171
Member Avatar for IamAuser

Try going at it like this... [code] #include <stdio.h> #include <string.h> #include <unistd.h> #include <stdlib.h> int main() { char line[50]; int count = 0; char c; while((c = getchar() )!= '\n') { line[count++] = c; } line[count] = '\0'; printf("you entered: %s\n",line); char *p = line; char *start = line;/*save …

Member Avatar for IamAuser
0
5K
Member Avatar for alex55

Try something like [code] for(int i=0; i<records && inFile; i++) { for(int j=0; j<month && inFile; j++) { inFile >> monthArray[i][j]; } } [/code]

Member Avatar for alex55
0
170
Member Avatar for HeartBalloon

Store the data in a structure [code] struct mys { unsigned int x; unsigned int y; }; struct mys the_s[10] = {{1, 2}, {3, 4}, {5, 6}, ...}; [/code]

Member Avatar for HeartBalloon
0
110
Member Avatar for emreozpalamutcu

Your missing a ) and have one too many ; [code] if (progressBar1->Value == 2000) { label1->Text = "Hello"; } [/code]

Member Avatar for jonsca
0
109
Member Avatar for daniel1977
Member Avatar for dos_killer

I cleaned your code up a little...well a lot [code] #include<pthread.h> #include<stdio.h> #include<sys/types.h> #include<semaphore.h> #include<unistd.h> pthread_t t1,t2; pthread_attr_t tattr; int counter; sem_t mutex; void* runner(void *arg) { int i = 0; printf("Thread received %i\n", *(int*)arg); for(i = 0; i < 5; i++) { sem_wait(&mutex); printf("Thread %i says %i\n",*((int *)arg),counter); counter++; …

Member Avatar for gerard4143
0
769
Member Avatar for dennis.d.elston

Well the member function 'get_gas' requires a double.. [code] void Car::get_gas(double fuel_level) [/code]

Member Avatar for dennis.d.elston
0
1K
Member Avatar for ITHope
Member Avatar for Jcastillo2010
Member Avatar for pinsickle

Try something like below [code] #include <stdio.h> #include <string.h> char data[] = "Hello, World!"; const char *delimiters = " "; void function (char* array []) { array[0] = strtok (data, delimiters); fprintf(stdout, "first string->%s\n", array[0]); array[1] = strtok(NULL, delimiters); fprintf(stdout, "second string->%s\n", array[1]); } int main () { char* array[2]; …

Member Avatar for pinsickle
0
215
Member Avatar for Butterflieq
Member Avatar for gerard4143
0
191

The End.