Forum: C Jun 8th, 2009 |
| Replies: 5 Views: 531 Read the documentation.
http://www.cplusplus.com/reference/clibrary/cstring/strncat/ |
Forum: C May 22nd, 2009 |
| Replies: 5 Views: 397 Are you saying you want a function such as:
function ( /* arg1, arg2, arg3, ... , argN */) |
Forum: C Jan 23rd, 2009 |
| Replies: 5 Views: 769 // 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 Is your program accepting integers as well as strings(letters)? |
Forum: C Oct 1st, 2008 |
| Replies: 2 Views: 1,798 > 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 Views: 1,873 http://www.daniweb.com/tutorials/tutorial45806.html |
Forum: C Aug 19th, 2008 |
| Replies: 4 Views: 1,729 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 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 Shouldn't the year be an integer. Therefore shouldn't you be using %d? |
Forum: C Apr 2nd, 2008 |
| Replies: 5 Views: 3,839 Yeah that sounds logical. |
Forum: C Jan 15th, 2008 |
| Replies: 10 Views: 3,874 Maybe
http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046380353&id=1044780608 |
Forum: C Dec 29th, 2007 |
| Replies: 4 Views: 1,254 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 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 >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 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 >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 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 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 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 |
Forum: C Nov 24th, 2007 |
| Replies: 58 Views: 4,923 |
Forum: C Nov 24th, 2007 |
| Replies: 58 Views: 4,923 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 >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 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 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 |
Forum: C Nov 24th, 2007 |
| Replies: 58 Views: 4,923 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 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 |
Forum: C Nov 24th, 2007 |
| Replies: 58 Views: 4,923 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 What does your input file look like. Post an example. |
Forum: C Nov 24th, 2007 |
| Replies: 58 Views: 4,923 Oh right, well when you've written it, come back here. |
Forum: C Nov 24th, 2007 |
| Replies: 58 Views: 4,923 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 What have you got so far? |
Forum: C Nov 24th, 2007 |
| Replies: 58 Views: 4,923 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 |
Forum: C Nov 24th, 2007 |
| Replies: 58 Views: 4,923 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 |
Forum: C Nov 24th, 2007 |
| Replies: 58 Views: 4,923 #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 |