C#Coder 0 Newbie Poster

Adding this because it took literally an hour of searching before I found a code sample using fscanf that read more than just the first line of a file.

This code assumes you're reading a file line by line that has the angle (int) followed by the Sine Value of that angle (double);

C#Coder 0 Newbie Poster

I haven't read through all the material, but it looks like it's specific for each blue tooth device. You'll need a BlueTooth SDK from the hardware vendor and then use PInvoke to access it's functions.

This newsgroup thread seems to be excellent.
http://dotnetjunkies.com/Newsgroups/microsoft.public.dotnet.framework.compactframework/2004/3/30/99101.aspx

C#Coder 0 Newbie Poster

by sizeof(myowndatatype) = 3 I meant that the size of the datatype should be 3 bytes

So you want to create a custom data type that has a size of 3 bytes? Why do you want/need a datatype of this specific size?

If we know where you're coming from we might be able to better help you find a solution.

C#Coder 0 Newbie Poster

Thanks Narue and Stack Overflow for your quick and accurate replies!!

All is now good and I can get on with the rest of the lab :)

C#Coder 0 Newbie Poster

Well I got it to compile and run.

Here's the errors that I found:

Your function prototypes didn't match the function's return type in it's code. (Aka, return a short but prototype says it returns void.)

You didn't close all functions with braces. Forgot a few :-P

You closed the switch statement with a brace but didn't open with one.

Other than that it's all good. One thing that I would change, not bad code just style, is to not use tab in the parameter list of a function and don't use it inside strings unless needed.

Here's the output from the console and I think you'll see what I mean about tabs in strings. It makes it hard to read.

Welcome to Craps 1.0

 Here are the rules:

You have 1000 dollars to start  gambling.

There are three types of bets.  You     can     bet     on:

  - 2 and 12 which      will give you the ratio of 5 to 1 if you win.
  - 4 and 10 which      will give you the ratio of 2.5 to 1     if you win.
  - 6 and 8 which will  give you the ration     of 1.5 and 1 if you     win.

The minimum amount      of money you can bet is 10 dollars and
 the highest amount     of money you can bet is 100.

Have fun playing!

You have :      1000    dollars.

Enter a type of bet ( 1 = '6/8',  2 = '4/10',   3 =     '2/12':

Other …

C#Coder 0 Newbie Poster

I'm trying to write a simple file output program for my class. The error I recieve when I try to compile in VS .net 2003 is the following.

fatal error C1083: Cannot open include file: 'fstream.h': No such file or directory

The code to my program is extremely straight forward as I always test a concept before incorporating it into the final solution. It's as follows:

#include <math.h>
#include <fstream.h>
#include <iomanip.h>

void main()
{
	int a[25];
	double s[25];

	for(int n=0; n < 25; n++)
		s[n] = sin(3.14159265*(a[n]=n*15)/180);

	ofstream out("SineDataV2.txt", ios::out);

	for(n=0;n<25;n++)
		out << setw(5) << a[n] <<''<<setw(12)<<s[n]<<'\n';

	out.close();
}

Any ideas why I can't include it? I'm pretty sure I'm including the correct file as MSDN reference tells me so: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang98/HTML/_iostream_ofstream.asp

Thanks in advance to those that help!

C#Coder 0 Newbie Poster

You can create your own data type by either using a struct or by using a class.

And so you know....

//This is invalid
sizeof(myowndatatype) = 3;  //You can't assign a value to a function...

//It should be this for seeing how big it is
int size = 0;
size = sizeof(myowndatatype);

If you need more help on this topic let us know ;)

C#Coder 0 Newbie Poster

A lot of the motherboards I've had experiance with are picky when it comes to how they have their RAM installed. Just by chance, are we talking DDR RAM here? I was looking to purchase some more RAM for my machine and in reading up on the overclocking forums discovered that most newer RAM chips need to be installed in pairs. So for me to install 1GB of PC3200 DDR RAM, I need to get two 512MB sticks.

Try either SiSoft Sandra or just googling your mainboard to see if this could be the case with your system as well.

C#Coder 0 Newbie Poster

Even though ASP.NET was written specifically for the Windows Platform there has been a really active movement in the Linux community to bring C# and the .NET framework over to their OS as well. This project is called Mono. From what I've read it is indeed possible to run ASP.NET with a C# code base on an Apache Linux based system.

Please realize that this is latest technology and literally hasn't been out yet for more than a couple months. You'll be exploring a new type of system setup. I has and can be done. In fact, I've just installed Fedora Core 2 in hopes of trying out the mono project and possibly ASP.NET in a linux environment as well.

Hope this answers your question. If not, I'll see what I can do, as will others on this board.

C#Coder 0 Newbie Poster

Well I got a job by following that old saying "It's not what you know but WHO you know". Many companies will forgo the experiance requirement if a perspective employee has the backing of well regarded one in the company. I had 0 experiance and no degree, but the VP of IT knew me from church, and knew I wrote and maintained their custom office applications.

I'm also a current student at DeVry (Computer Engineering) but I'm also an Applications Developer for a financial firm that I've been with for a year and a half. So I don't have that much experiance, but I can deffinantly tell you that at least in the corporation I work for help desk is help desk. It's not a stepping stone to another position. If to any position it's to help desk manager.

Low level positions are typically Junior Developer, Level I ect... Another way to get into programming is to get in with the web group (if you have a knack for web graphics, UI, ect...) You can apply your programming skills to interal applications as well as the public web site. Plenty of databasing, dlls, and COM+ to go around.

Also, work with DeVry co-op, many of my friends have had good experiance with that program.

Hope that helps.

C#Coder 0 Newbie Poster

Here's a neat coding project recently posted over at http://blogs.msdn.com:http://www.theserverside.net/blogs/showblog.tss?id=BuildProviders

If I were you I'd take a project or concept you're really interested in and think of a way to build a great application on it. Or whats a task that you do often that could be automated? Automation programs are nice. Ever sit around wishing you had a program that did such and such? well write it.

Thats how many small projects get started. At work we couldn't find a system that fully integrated help desk tickets with code changes in a project with automated build deployment across multiple servers and the verification that those files were the only files that changed on the servers that day. And don't forget source control, and logging of what developer did what when and why. So you know what, i wrote it.

Thats what we programmers do. We solve problems with code.

What about a program that you use frequently that's missing a feature you really want? Write that feature.

You could perhaps create a database that would contain all types of information about a user's friends and family. When they recieve an IM from the person, a side bar would pop up with a picture, name, phone, address, web sites, last five emails, and last five IM conversations. It would give you a chance to use some interop components, a database, and write a gui and all yourself.

Just some ideas....

C#Coder 0 Newbie Poster

kc0arf is exactly right.

I'm a part time developer for work and a full time computer engineering student. So time is rare, and I tend to only be on these forums when I'm searching for help to my own problems. Once I find it, I post a couple responses to others that need help. Makes me feel better about recieving the help of others and using code that didn't come directly from my mind.

If you want to add me to your buddy list feel free, but keep questions in the forums. I wouldn't be opposed if you wanted to notify me when you posted, but more than likely there isn't a need for that. From the little I've been here the place seems to be active with quality posters that know their stuff.

Best of luck to you! Just remember that coding should be fun :-)

C#Coder 0 Newbie Poster

Here's one link that might help you out: http://www.free2code.net/tutorials/programming/1/Creating_a_Programming_Language.php

And another:http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-cooltools.html

Were you trying to write a scripting language or an actual full blown language?

One thing I thought of that you'll need to consider, is your language just a wrapper for another one (aka parses into C and compiles the C verision) or would it actually compile your language straight into a machine code?

Let us know where you go with this! It's an interesting project. I sure there are some great books out there on Compiler Theory as well.

C#Coder 0 Newbie Poster

Just my personal opinoin but I would use whatever language you're most comfortable with.

Once it's compiled, makes no difference to the PC what language you chose.

I don't know much about latin, but is it basically a 1 to 1 relationship? or more like a phrase to word relationship?

Either way, I'd use a SQL backend with a table that has either the english(word/phrase) or latin(word/phrase) as the identity column, and index it for fast string searching when replacing text with the translation. Could possibly make use of the SQL LIKE command. I don't do much with flat file databases so maybe you know of a good algorithm to use that's fast rather than wasting code/processor on a SQL connection.

Just an idea.... hope you get some more.

C#Coder 0 Newbie Poster

What do you mean by print from the text box?

Do you want to "print" this to the screen, console, file, a physical printer?

C#Coder 0 Newbie Poster

.net is a programming language

.Net is NOT a programming language, it is an application framework.

When you write a .Net application, no matter what language you use, it gets compiled down to an Intermediate Language(IL). When a user executes that app the IL code is loaded and ran by the Just In Time(JIT) Compiler. Because of this the applications memory management and garbage collection is taken care of, greatly reducing buffer overflows and memory leaks.

A .Net application is also language independent. That means that if you were writting a sound recording app for windows in C#, but someone else has already written a fantastic API in Python.Net, it doesn't matter. You can either import the resulting dll of the API (closed source), or the project (if it's open source), and add it to your solution. Once in, you can access it's class through C# without any hassle at all. The syntax you use is all C# even though the functions you're calling are written in Python. Thats all because both code sets compile down to the IL for seemless integration. This is a fantastic ability when you have a large number of class libraries written by a number of developers with varying language tastes.

Also, because the IL is standardized, non-MS languages (like Python) can and have been ported over to .Net versions.

Another up and coming feature is cross-platform applications. Check out the Mono Project to see how some fantastic open source dev's …

C#Coder 0 Newbie Poster

Please note that if you want to use good ol' C++, aka without the CLR and completely unmanaged code, make sure that it's a Win32 project under the C++ project types. If it says .Net in it, then the code compiles for use with the CLR and is fully managed. That means that if you require MFC or ATL, you should use the Win32 projects, and if you want to use System.Windows.Forms you should use .Net.

Hope that helps!

C#Coder 0 Newbie Poster

Well hello all! Found a thread on this site that helped me out, so I decided to join up and help someone else out!

C#Coder 0 Newbie Poster

Looks like you did. But that won't compile, you have no ;'s at the end of the lines, and the int variables are declared incorrectly
should be

int toys; toys = 62;

Also you need to have the last cout inside the main function, and either use the std namespace or call it as std::cout

example

using namespace std;
cout << "Hello!";

or

std::cout << "Hello!";

Other than that, what's your question?