Search Results

Showing results 1 to 40 of 109
Search took 0.04 seconds.
Search: Posts Made By: iamthwee ; Forum: C and child forums
Forum: C Jun 8th, 2009
Replies: 5
Views: 531
Posted By iamthwee
Read the documentation.

http://www.cplusplus.com/reference/clibrary/cstring/strncat/
Forum: C May 22nd, 2009
Replies: 5
Views: 397
Posted By iamthwee
Are you saying you want a function such as:


function ( /* arg1, arg2, arg3, ... , argN */)
Forum: C Jan 23rd, 2009
Replies: 5
Views: 769
Posted By iamthwee
// call this myfile.h
#include <stdio.h>
int sum ( int, int );
int sum ( int x, int y )
{
return x + y;
}

// Program to be run: main.c
#include <stdio.h>
Forum: C Nov 4th, 2008
Replies: 4
Views: 529
Posted By iamthwee
Is your program accepting integers as well as strings(letters)?
Forum: C Oct 1st, 2008
Replies: 2
Views: 1,798
Posted By iamthwee
> i have to make pointer to point to the character

Why just return the position as an integer.
Forum: C Sep 17th, 2008
Replies: 4
Solved: Character input
Views: 1,873
Posted By iamthwee
http://www.daniweb.com/tutorials/tutorial45806.html
Forum: C Aug 19th, 2008
Replies: 4
Views: 1,729
Posted By iamthwee
Maybe you could find the length of the string inbetween the commas. If it is zero then fill it with a space or newline.
Forum: C Jun 30th, 2008
Replies: 24
Views: 2,769
Posted By iamthwee
How is your struct further subdivided:

For example:


struct
{
char cname[8];
char sname[16];
char exam[16];
Forum: C Apr 10th, 2008
Replies: 8
Views: 690
Posted By iamthwee
Shouldn't the year be an integer. Therefore shouldn't you be using %d?
Forum: C Apr 2nd, 2008
Replies: 5
Views: 3,839
Posted By iamthwee
Yeah that sounds logical.
Forum: C Jan 15th, 2008
Replies: 10
Views: 3,874
Posted By iamthwee
Maybe
http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046380353&id=1044780608
Forum: C Dec 29th, 2007
Replies: 4
Solved: Decompile
Views: 1,254
Posted By iamthwee
In short no.

You might however, get some useful information if you use a hex editor on the exe file.
Forum: C Dec 29th, 2007
Replies: 23
Views: 2,340
Posted By iamthwee
Put some printf(s) in strategic places to help you find out where you are going wrong.

Using fllush(stdin) and gets() probably doesn't help matters... And void main...
Forum: C Dec 9th, 2007
Replies: 8
Views: 919
Posted By iamthwee
>Oh yeah, don't int main(void).

http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1044841143&id=1043284376
Forum: C Dec 7th, 2007
Replies: 4
Views: 812
Posted By iamthwee
You could use a struct, or if the idea is too abstract for you, toy with the idea of parallel arrays, like you said.
Forum: C Nov 26th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
>that is using win main.. which is c++?.
No, not necessarily, you can use c as well with win32. Think of win32 as a separate entity, severed from either c or c++. You use one or the other to help...
Forum: C Nov 26th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
You should not use gets() for user input. I have already shown you how you use fgets() to achieve the same thing. You should use it all the time.
...
Forum: C Nov 26th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
You should use your initiative to solve your problem. You have more than enough information to get continue.
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
Sorry I have to go. You should have enough info to complete your program.bye
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
what output do you get?
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
Look i'm running out of time this should be the final one. I don't have a compiler to test it with so it might not work...

void encode ( char ch );
char alph[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
...
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
>im guessing that it cannot convert the string because encode takes characters

Correct, so what do you think you must do?

[edit] don't use gets, it's real bad, use the example I showed you...
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
Right now is it necessary for the user to type the path at the command prompt? If it is let's try and get that working first.
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
Okay I know what you've done. Go to the text file click rename then delete the .txt you have there.
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
hmm, ok go to

start > run then type cmd then click ok

In command prompt if it isn't already pointing and c:\>

keep typing cd.. <enter>
until you get there.

When it is pointing at c:\>...
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
Is your file called data.txt or data.text

And did you remember the double backslash after the c:\\
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
Keep it simple, do one thing at a time. Try to read in a file line by line. Then see if you can adapt that to include your morse program code.

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

#define...
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
What does your input file look like. Post an example.
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
Oh right, well when you've written it, come back here.
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
where are you reading in the file?

And why did you use strlen() within the for loop.
http://www.cprogramming.com/tips/showTip.php?tip=59&count=30&page=1
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
What have you got so far?
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
Mark this as being solved. (bottom rhs)

Next time use standard c and intent your code with spaces instead of tabs.
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
And this one...



void encode ( char ch );
char alph[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
/* morsecode is an array of pointers to char. It is initialized
* so that each element points to a...
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
what are you typing in?
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
#include "stdafx.h"
#include "stdio.h"
#include "ctype.h"
#include "string.h"

void encode ( char ch );
char alph[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
/* morsecode is an array of pointers to...
Forum: C Nov 24th, 2007
Replies: 58
Views: 4,923
Posted By iamthwee
Showing results 1 to 40 of 109

 


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

©2003 - 2009 DaniWeb® LLC