Search Results

Showing results 1 to 40 of 354
Search took 0.02 seconds.
Search: Posts Made By: gerard4143
Forum: Getting Started and Choosing a Distro 10 Hours Ago
Replies: 3
Views: 64
Posted By gerard4143
Tried installing it and...Well lets put it this way, if I wasn't so entrenched in Mandriva I would have switched.
Forum: C 10 Hours Ago
Replies: 6
Views: 98
Posted By gerard4143
I'm sure GCC will survive...dings and all
Forum: C 12 Hours Ago
Replies: 6
Views: 98
Posted By gerard4143
I did use -ansi -Wall

When I tried -ansi -Wall -pedantic it generated a warning but still compiled and ran without incident..
Forum: C 12 Hours Ago
Replies: 6
Views: 98
Posted By gerard4143
I tried compiling this with the GCC compiler and its works...so I tried compiling with the -S switch(Stop after the stage of compilation proper; do not assemble) and found it create a function...
Forum: C 1 Day Ago
Replies: 2
Views: 109
Posted By gerard4143
Try adding this to your if statement:


if(str[i] == 'a')
{
a++;
}
else if(str[i] == 'b')
{
b++;
Forum: C 1 Day Ago
Replies: 7
Views: 223
Posted By gerard4143
That would be a debugger your talking about...If you expect your IDE to come fully featured then it won't be lightweight....Can VIM use a debugger? I really don't know because I never tried...

I...
Forum: C 1 Day Ago
Replies: 7
Views: 223
Posted By gerard4143
If you want simple and complex then try VIM...
Forum: C 2 Days Ago
Replies: 2
Views: 133
Posted By gerard4143
No the code looks fine..If you want to optimizes try experimenting with the compiler's optimizing settings...

Also you may want to look up VLA or 'variable length arrays'
Forum: C 3 Days Ago
Replies: 14
Views: 539
Posted By gerard4143
Its undeniable, the point you make.
Forum: C 3 Days Ago
Replies: 4
Views: 197
Posted By gerard4143
Then why would you put it in your program?


#
const char *str = &part1; //LINE 28


You have const char *str and your assigning the address of struct parts to it without a cast..
Forum: C 3 Days Ago
Replies: 4
Views: 197
Posted By gerard4143
I would use fwrite


fwrite(&part1, sizeof(struct parts), 1, fd);

Where fd = FILE *stream
Forum: C 5 Days Ago
Replies: 4
Views: 196
Posted By gerard4143
Note...I tried the above code with a client program I have here and it worked...Meaning it send the data and the client received it...
Forum: C 5 Days Ago
Replies: 4
Views: 196
Posted By gerard4143
I quickly tried this an it doesn't fail...Note I never worked with AF_INET6...Also i took the liberty of changing some of your constants..


#include <stdio.h>
#include <stdlib.h>
#include...
Forum: C 5 Days Ago
Replies: 4
Views: 196
Posted By gerard4143
Try:


connectSocket= accept(listenSocket, NULL, NULL);


Also I would check if an error returned on the two lines


bind(listenSocket,(struct sockaddr*)&serverAddress,sizeof(serverAddress));
Forum: C 6 Days Ago
Replies: 2
Views: 237
Posted By gerard4143
Try investigating order of operations
Forum: C 7 Days Ago
Replies: 4
Views: 308
Posted By gerard4143
Not really sure what your question is...well beside the main homework question..
Forum: C 7 Days Ago
Replies: 1
Views: 311
Posted By gerard4143
Dynamic array yes..Look up VLA - variable length arrays
Forum: C 9 Days Ago
Replies: 14
Views: 539
Posted By gerard4143
I'm not really sure what your after...but you could try working with a marco..

Note - Marcos are processed by the preprocessor as well
Forum: C 9 Days Ago
Replies: 14
Views: 539
Posted By gerard4143
The include statement is processed by the preprocessor so it can't be dynamically created in the executable...

If you want to do this try Dlls
Forum: C 9 Days Ago
Replies: 12
Views: 501
Posted By gerard4143
What do you have so far?
Forum: C 10 Days Ago
Replies: 4
Views: 310
Posted By gerard4143
Did you even look at what I posted?
Forum: C 11 Days Ago
Replies: 9
Views: 312
Posted By gerard4143
He wanted to know why and that's probably why. One compiler set up the assembled code to read the values left to right and one set up the values to be read right to left. Like you said the language...
Forum: C 11 Days Ago
Replies: 9
Views: 312
Posted By gerard4143
Because you don't set i back to 5


c=i++ + ++i + i++ + --i;
i = 5;////set i back to five
printf("\n%d",i++ + ++i + i++ + --i);
printf("\n%d",c);
Forum: C 11 Days Ago
Replies: 9
Views: 312
Posted By gerard4143
It probably depends on how the compiler evaluates the expressions...left to right
or right to left...
Forum: C 11 Days Ago
Replies: 4
Views: 310
Posted By gerard4143
check out what I did here, I put three fprintf lines in here to check the values you are entering in your char**...Also this program had many errors...It won't compile for me so I changed some of it...
Forum: C 11 Days Ago
Replies: 2
Views: 215
Posted By gerard4143
fopen is defined as

FILE* fopen(const char *path, const char *mode);

and you have fopen (out, "w"); where out is FILE*.
Forum: Getting Started and Choosing a Distro 12 Days Ago
Replies: 9
Views: 722
Posted By gerard4143
No KDE is O.K. just different...I run KDE on my Slackware box
Forum: C 12 Days Ago
Replies: 4
Views: 260
Posted By gerard4143
I'm not sure which compiler your using but you should engage your warnings...i.e. gcc has a switch setting -Wall which is "warn all" and it picked up this problem in the compile stage..
Forum: C 12 Days Ago
Replies: 4
Views: 260
Posted By gerard4143
This function returns the address of the local variable str


char * leer()
{
char str[LONG], *p;
int c;
p = str;

while((c = getchar()) != EOF)
Forum: C 13 Days Ago
Replies: 5
Views: 286
Posted By gerard4143
Or this one which is a little more exotic - the language lawyers should love this one


#include <stdio.h>
#include <stdlib.h>

void Test(char **cptr);

int main()
{
Forum: C 13 Days Ago
Replies: 5
Views: 286
Posted By gerard4143
I have this much modified example that you could use for an example:


#include <stdio.h>
#include <stdlib.h>

char* Test();

int main()
{
Forum: Assembly 13 Days Ago
Replies: 2
Views: 348
Posted By gerard4143
I would investigate the compare opcode and jump equal, jump not equal opcodes

Try this link:
http://www.amd.com/us-en/Processors/DevelopWithAMD/0,,30_2252_875_7044,00.html

manual 3...
Forum: C 13 Days Ago
Replies: 5
Views: 286
Posted By gerard4143
Right away I see some problems

void Test(char, int);

void Test(char *text, int *sizeptr)
Forum: C 13 Days Ago
Replies: 2
Solved: Parsing in C
Views: 250
Posted By gerard4143
Try defining your string "instruction" like below...
Also if you have errors in the future could you post them


/* Libraries */
#include <stdio.h>
#include <string.h>

char instruction[] =...
Forum: C 13 Days Ago
Replies: 1
Views: 200
Posted By gerard4143
Try this link...it has it all broken down

http://makepp.sourceforge.net/1.19/makepp_tutorial.html
Forum: C 14 Days Ago
Replies: 3
Views: 309
Posted By gerard4143
Here's a simple one:


#include <stdio.h>
#include <stdlib.h>

int main(int argc, char**argv)
{
fprintf(stdout, "ans->%u\n", 0xe5f6b7);
exit(EXIT_SUCCESS);
Forum: C 14 Days Ago
Replies: 8
Views: 277
Posted By gerard4143
A very simple solution would be to read your character and then read the newline character into a dumby variable like


char ch, extrach;

fputs("enter a character->", stdout);
ch =...
Forum: C 14 Days Ago
Replies: 8
Views: 277
Posted By gerard4143
Try looking at this simple version of what your doing


#include <stdio.h>
#include <stdlib.h>

int main()
{
char mych = 0;
fputs("enter a character->", stdout);
Forum: C 14 Days Ago
Replies: 8
Views: 277
Posted By gerard4143
I added a fprintf function in your code...run and check the values of choice..


#include <stdio.h>
#include <stdlib.h>
#include <string.h>


void user()
{
Forum: C 14 Days Ago
Replies: 8
Views: 277
Posted By gerard4143
What is this program supposed to do? If you could give us an example...say

When I run this program and I'm prompted for this and I press this - this happens, when in fact this should happen...I...
Showing results 1 to 40 of 354

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC