Does this operation require the use of sizeof operator? & please look at my previous post, I have edited it.
That would be compiler dependent -- but probably not.
Does this operation require the use of sizeof operator? & please look at my previous post, I have edited it.
That would be compiler dependent -- but probably not.
You mean the way the web works at present, across a whole plethora of different platforms?
I think it is a miracle that it works at all :)
Why is the cast necessary?
Because without the cast the difference is 1 integer. If you take the difference between &x[2] - &x[0] the difference is 2 integers.
Incidently when you get stuck on little problems like this and can't figure them out where do you look for help?
DaniWeb :)
The compiler adds code to the program to call the constructor.
[edit]^^^ What Jerry said too. [/edit]
Yes that will work, and its done like that all the time.
>> And is linux and unix the same thing?
No. click here
declare two variables a and b then subtract their addresses. That is really a terrible way to do it because there is no guarentee that the two variables will be next to each other -- the compiler is free to put anything it wants between those variables. Using the sizeof operator is the only way to guarentee getting the correct answer.
ShowFile() is coded incorrectly. This is how to read the file one character at a time. This will only read the first sizeof(s) characters, so if the file consists of more lines it may not read the whole file.
memset(s, 0, sizeof(s)); // clear the array of all junk data
i = 0;
while(f1 >> s[i] && i < (sizeof(s)-1))
{
cout << s[i];
i++;
}
But a much easier way to code it and it will read the whole file regardless of how may line the file contains.:
while( f1.getline(s, sizeof(s)) )
{
cout << s << "\n";
}
Actually, one begins to wonder why everyone is covering up for McCain - Katie Couric actually cut McCain's screwing up the Iraq timeline and inserted something he said earlier in the interview(see the split screen here). He mistakes Sunnis for Shia, thinks Iraq borders Afghanistan, can't seem to get the Iraq war timeline correct, mixed Somalia and Sudan -- sometimes they don't seem so much like gaffes but like McCain is just clueless.
Ah, well - it is going to be a long campaign and a battle of 'the gaffes' with maybe a 'macaca' moment.
McCain isn't cluless -- he's just showing his age. Old people get easily confused, and we want someone like that in the white house why??? I would rather have someone with a little less experience and a great deal more of his facalties. McCain needs to be in a retirement home, not the white house.
since you did not declare the using clase you will have to declare the namespace in which Func() exists, that is a::Funct()
I found it humerous too -- Obama may turn out to be as teflon coated as Reagan. McCain just can not even dream of getting the appeal that Obama has.
how do the Republicans spell j-e-a-l-o-u-s-y ?
Yes We Can !
Yes We Can !
Yes We Can !
Yes We Can !
Yes We Can !
Yes We Can !
You can not compile the client files by themselves -- see the test project (the third download). The files in that client download are intended to be incorporated into your own project which you want to add the looging feature.
>>Do you want to permanently remove the source control bindings from the projects?"
The project files require VC++ 6.0 compiler and you are attempting to compile them with a newer compiler. If you are using one of the Express versions such as VC++ 2008 Express then it won't work because the Express versions don't support MFC.
Here is the output I get
Empezar?
4 - si
5 - no
There are quite a few compiler warnings -- conversion from float to int may loose data. And a couple of uninitialized variables are used.
In c++ NULL is defined to be 0. There is no general agreement about whether to use NULL or 0 for pointers
In C++, the definition of NULL is 0, so there is only an aesthetic difference. I prefer to avoid macros, so I use 0. Another problem with NULL is that people sometimes mistakenly believe that it is different from 0 and/or not an integer. In pre-standard code, NULL was/is sometimes defined to something unsuitable and therefore had/has to be avoided. That's less common these days.
>>I know the address (ArtMoney)
I have no clue what that means.
>>after all I'm here to learn
Great, so start by writing your own code.
// put include statements here
int main()
{
// put your code here
}
I'm on Vista Home Premium using IE7 and below is all I get
Wow! After reading Ark's comments you can scrap the comments I made because they are next to useless in your program.
What part of that do you not understand?
MS-Windows is not a real-time operating system, so no matter what you try the signals might or might not arrive to your program on time. You might try the Communications Resources link
what do I feel? disappointment because the link doesn't work.
1) departure time, arrival time and landing time should be integers, not floats since they should be entered in YYYMMDDHHMM format. Just entering HHMM is not much value because they could span two or more days, especially if the airplain crosses the international date line.
2) you need to create a structure to hold the information for one person, then have an array of those structures because its easier to keep all the info for one person together. Using separate arrays for each of the times is not a good way to do that because it can become cumbersome and difficult to keep the arrays in sync.
1) are those null-terminated strings? If yes, then the first row in A would be abc, not abcd.
2) I guess C will contain the row number in B that matches the row in A?
probably something like this
const int maxrows = 15;
for(int i = 0; i < maxrows; i++)
{
for(int j = 0; j < maxrows; j++)
{
if( strcmp(A[i], B[i]) == 0)
{
C[i] = j;
break;
}
}
}
is there any way you can give an example as a test bench to begin i have limited os programming
thanks again
Yes -- one way to do it is to write a service program, which is started when the operating system boots up.
Read this short tutorial and see if it gives you any hints about your problem. If you have not yet done so already you should join that web site because it has hundreds of MFC programs, tutorials, and free MFC libraries you can use in your own MFC projects.
line 10: That won't work because the vector is an empty vector. Wait until you get ready to use the iterator before assigning it to begin().
you could code that j loop using an iterator instead of an int counter
vector<CObject>::iterator it;
for(it = group.begin(); it != group.end(); it++)
{
if (strcmp(identifier, it->getID()) == 0)
{
group.erase(it);
break;
}
}
If you make getID() return std::string instead of char* you don't need to call strcmp().
You could rewrite it and remove all the MFC stuff, but you might need to buy a book to figure out how to do it because it can get complicated. I don't know if you can write a service program with the Express compiler or not -- never tried it.
Write the program just a little bit at a time so that you don't get overwhelmed with all those instructions.
1) Start out by creating a structure that holds the information for one passenger.
2) Then create a 2d array of those structures that represents the seats in an airplain.
3) create the menu with switch statement for choice
When you get all the above done you can write the code that implements each of the menu items -- do them one at a time to make it easier.
And don't try to write all that code at one time before compiling!!!
Get it here link found on wiki scroll all the way to the bottom of the page and you will see External Links. There is also a link to User's Guide which might, or might not, answer Ron's question. Since that compiler was written for MS-DOS 6.X and earlier its unlikely it will support printers on any version of MS-Windows.
If you want to learn vb, forget about GWBASIC and learn VB 2008 Express, you will like the results a lot better.
How can we use our member certificate on other web sites so that it is displayed on every post I make? For example, I thought I might be able to put it in my signature, but that doesn't work, and avatar doesn't work either. Any other way I can do this?
Wan t to share this with you :)
A brief history of windows:
WINDOWS FOR WORKGROUPS - A newborn child
WINDOWS 3.1 - A 3 year old
WINDOWS 95 - A 6 year old know it all, stamping its feet on the ground
WINDOWS 98 - Just graduated elementary school
WINDOWS ME - Tried pot for the first time
WINDOWS 2000 - Said no to the pot
WINDOWS XP - Made it to high school, and is willing to learn
WINDOWS VISTA - XP on Meth-Amphetamine
WINDOWS 7 - (Hopefully a high school grad)
I almost never give out negative rep in technical forums because I don't want to destroy anyone's reputation. I do give it out occasionally in geek's lounge because it doesn't affect overall rep points there. The rep for mods works the same as anyone else's, and the last time I heard it was 1/2 for negative rep.
The main reason I have such a large rep power is because of my huge post count. You get more rep for every 1,000 posts. And the more you post and participate in the technical boards the more frequently other members will give you good rep (assuming you post positive instead of negative things). My rep count doesn't mean I'm a better programmer than either Narue or Salem (which I don't think I am) ... it only means I participate in the forums more.
Mine works ok.
>>Where did it go ?
I dont know much about IIS but I know that on XP Pro you get IIS but it is limited to 5 connections at the same time. You could probably install XP pro as a partition on your mac and run an FTP server on the windows side. This should let them communicate with each other but I dont know.
Regards,
Sam Rudge
Now how to you expect to run xP in one partition and MAC in the other at the same time?? To get more than 5 connections on XP you need to buy XP Server with the number of connections you want. I don't know the current costs but a few years ago Microsoft charged something like $10,000.00USD for unlimited number of connections.
As for running IIS and VC on MAC -- forget it. Get another computer for that because MAC runs on top of linux.
See Communications Resources in MSDN for explaination how to do that on MS-Windows. What you might want to do is set up a callback function that windows will call when incomming data is available at the comm port.
Well it's an easy fix isn't it? >_>
char strarray[100] = {0}; string str = "Hello"; int arrayLength = str.length(); for (int i = 0; i < arrayLength; i++) strarray[i] = str[i];
Yes, it is an easy fix. What you did is one way to do it. The other way is to simply add another line starray[i] = 0;
after the end of the code snippet (line 7). This is probably preferred because it insures the string is correctly null-terminated no matter how many different strings that are copied into the character array.
char strarray[100]; string str = "Hello"; int arrayLength = str.length(); for (int i = 0; i < arrayLength; i++) strarray[i] = str[i];
1) Don't use [CODE=CPP] use instead [CODE=CPLUSPLUS]
2) The code above contains the same bug as the version previously posted. Q: What is the bug? A: The resulting string is not null terminated.
What you are learning from that book is the c++ language itself. What you see in the VC++ Forms code is just an implementation of c++. You need to know the c++ concepts before you will understand managed code programming. And yes, there are books written to teach managed c++, and here are a few google links that might help you if you have not already seen them. If you want to get into Windows Forms then it would be worth the money to buy a good book that covers that subject.
Just a quick note that I just finished installing a wireless keyboard and mouse, and everything works great right out of the box :) :) All I had to do was turn off my computer, unplug my old monster of keybaord + mouse, plug in a Logitech gadget (some technical term huh?) into a usb port, and turn my computer back on. This is the easiest hardware installation I have ever encountered. I don't mean this to be an advertisement for Logitech, but you have to given them a lot of credit for making their stuff so easy for non-technical people to install.
If you have already done the previous parts then you should have vew problems with Task 3 (a). All that is asking you to do is write a function that (1) asks for a member's name, and (2) search the file for that member and display the payment info.
parts b and c require no code at all, only pseudocode that describes the steps needed to write the reports.
I got that *.zip file and tried to compile it, but Dev-C++ reports error that it cannot exec 'cc1'. It compiles the *.cpp files ok, but pukes at the resource file(s).
Actually, Dev-C++ is just an IDE. It doesn't compile anything, but calls other compilers, such as minigw and Visual C++. Dev-C++ is apparently no longer under development, so I think Code::Blocks may actually be the better IDE
which one(s) to use depends on the operating system. MS-Windows uses the win32 api functions, and here is a short introduction tutorial. There are several other GUI libraries too, but that tutorial will get you started.
1) Yes, but I don't think anyone does because its only a beta compiler
2) No. They are two different compilers. Visual C++ is by Microsoft and Dev-C++ is by Bloodshed
the easiest way is to use sprintf with "%X" format specifier
int main()
{
char buf[255] = {0};
int x = 1234;
sprintf(buf,"%X", x);
printf("%s\n", buf);
return 0;
}