Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Remove the & before input.operation and input.value because they are already passed as pointers. It is not necessary to use & before character arrays unless you want to pass a pointer to somewhere other than at the first character in the array.

If you want to use & then do it like this: &input.operation[0], but that is just redundent as explained above.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Here is what you are looking for. Easily found using google.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

There probably is a statistical lib somewhere, just google for it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

line 21: remove the comma. Otherwise your code compiles ok with VC++ 2012. All I did was place the two typedefs in your last post before the structured declaration in your first post, then removed the comma on line 21.

typedef void ( __stdcall * TManagerProc)(void);
typedef void ( __stdcall * TManagerErrorProc)(unsigned ErrorCode);

struct TManagerData
{
public:
    // Card is inserted callback procedure
   TManagerProc CardInserted;
    // Card was activated callback procedure
   TManagerProc CardActive;
    // Card was removed from the reader  callback procedure
   TManagerProc CardRemoved;
    // Invalid card was inserted into the reader callback procedure
   TManagerProc CardInvalid;
    // There is no card in the reader and reader is waiting for the next operation
   TManagerProc ReaderWaiting;
    // Card operation error  callback procedure
   TManagerErrorProc Error;
} ;

typedef TManagerData  MANAGER_DATA;
typedef TManagerData *PManagerData;

int main()
{

}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

where is TManagerProc defined? It has to be defined before it can be used.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

what is the error?

line 66: what if I enter a value of 500? Your program will blow up with that. You need to put a check in there to make sure its a value between 0 and 50.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I don't want to get another thread's message.

My misunderstanding. In that case yes, CWinThread will probably work. As for worker threads, you can put a message pump into them so that they can receive messages. Not usually done though.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

so the path might look like this: "'\0'home'\0'etc'\0'whatever'\0''\0'" That is not a text string and won't work with std::fstream, or FILE*. Whoever wrote the file system probably also has a compiler with stream functions/classes that work with it. If not, I don't know how anyone could write a program to run on it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You would have to know what characer is used instead of '/'. When UNICODE is used the byte sequence of a single character could contain '\0', or NULL, especially of the language is Chinese where characters are represented by graphics and occupy two or more bytes per character.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

So what's the problem with that? NULL is just a string terminating character, not part of a file name in any file system that I know of. If you have a file that contains a filename that is terminated with a NULL byte then all your program has to do is stop reading the filename when the NULL byte is encountered, the very same way it would if it were terminated with normal line terminating sequence of characters. The NULL byte is not part of the filename, only a terminating byte.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you need to use a graphics library, such as win32 api for MS-Windows. There are cross-platform libraries, such as wxWidgets and QT (a compiler). So the answer to your question will depend on the operating system you are using and the compiler.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You don't actually add new elements -- just keep track of the next unused element then increment the counter once that element has been filled. Static arrays can not be expanded or contracted, so declare an array of integers of size 5000 elements, then declare an int counter which keeps track of the next unused element, and should initially contain 0.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Your program worked ok using VC++ 2012 Express. I just created a directory structure like the one in your program and copied a text file named sample.txt. That tells me your problem is either your compiler or the location of the file.

Move sample.txt to c:\ and see if your program works with that. It's possible the path is too long for your compiler or the compiler doesn't like the ++ in the folder name.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Yes, that seems to be the right code. now, don't you have to do something with that? Such as display it?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

apparently not, otherwise the program would be able to find it. Make sure the spelling is correct.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

There is no float named monthlyInterest, maybe you are thinking monthlyInterestRate??

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

use Windows Explorer and check if that file exists. My guess is that there is no such file in that folder.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

line 23 declares a variable of type float named monthlyPayment, not a function named monthlyInterest().

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The error(s) reported by vc++ is because the compiler is compiling the source files as c++ instead of C. In C the return value of void* functions such as malloc() do not need to be typecast, but in c++ they do. This is a requirement of the C and C++ ISO standards. Your source file has *.cpp extension as indicated in the error message, so it's being compiled as c++. Change the extension to *.c and the erorr(s) will go away.

I suspect gcc does not complain because you named the source files with *.c extension instead of *.cpp

In VC++ 2008 after creating the c++ project you have rename the files with *.c extension.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

line 34: where is function monthlyInterest() prototyped?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

how is argv getting the file name? However you do it make it the full path to the file. Otherwise, the file should be located in the same folder where the program's source files are located because that's where vc++ runs the program from.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

(I am struggling in a class that I really shouldn't have taken

Then drop the course and take something else.

Post what you do know how to write then we can go from there to help you. No one here is going to write all of it for you.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

what compiler and operating system are you using? If you are getting the error that the file is not found then the file is not where you think it is or the program isn't running in the same folder as the file. Put the full path to the file on the command line and see if that works.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Help you do what exactly? Start your program that just opens a file then reads it one line at a time. Once you get that compiler without errors and working, you can do the rest of the assignment. Do the assignment one small step at a time and you will have it done in no time.

Your program will need to include stdio.h and string.h, as a minimum.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

String^value;

That's CLR/C++, not c++

line 11: missing a space between int and main()

line 12: missing { to tell the compiler its the start of a function. Then you need } after libne 26 to indicate the end of the function. For every { you need a }. It is best if you align them up then indent code two or three spaces.

line 16: the { at the beginning of that line is not needed. Delete it.

You need to pay close attention to where you put { and }, don't just put them in random places. The code you posted should look like this:

#include <iostream>

using std::cout;
using std::vector; 
using std::endl;

//vector<int> v(10); 



int main() 
{
   cout << "*";


    for (int i = 11; i >= 1; i--) // <<< this will print the stars upside down because the loop counts backwared
    { 

        for(int n=0;n<i;n++)
        {
            //cout << '*';
        }
        //cout << '\n';
    }

    n=0; // <<<< Error, undeclared variable
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Any reason you are trying to use CLR/C++ instead of just c++? Create a c++ (or c) win32 console program, then call cout to display each asterisk and space. No need to store them in a std::string variable.

Because of the markup language used in this editor it's impossible to tell if you are attempting to display a triangle of stars where there are spaces before each row of stars? Or just rows of stars as shown in your post. The markup language removes leading spaces so I don't know which you need to display.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

awesome video! Just like looking out the window of an airplain. The ending was a suprise to see two men climbing that high. What building did they climb?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

where is the array cellphone used in lines 34-40 declared?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

line 70 is attempting to store a value that is less than zero into an integer, which can not hold such values. If you are not allowed to use doubles than multiply the result of the division by 100 and assign that to the integer. Example: (1/2) * 100 = 0.5 * 100 = 50, meaning 50%.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

getting an error

What error? I can't see your monitor.

phdn->iItem ='↑' + phdn->iItem;

Why are you doing that??? iItem is an index number (integer) of item associated with notification.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Each node in a linked list is actually a pointer to a node object, in your case a node is a structure that contains words and a pointer to another node. So to create an array of pointers to the nodes, create the array of pointers, then use a loop to set each pointer to one of the nodes.

Practice a little creating simple linked lists and all the above will become clear.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

If you are using the program in your other thread it won't be easy to do what you are asking. It might be easier to use a different grid, one in which you can get the source code (free). One such grid is at codeproject.com, just go there and search for grid controls. I've used it for many years and its somewhat easy to modify. Of course you will need to know MFC and c++ pretty well.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Yup, rewrite the entire file , replacing the line you need to change.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

depends on how the file is written. If its a simple text file then you will most likely have to completly rewrite the file.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Aw Shucks! I do that every day :)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

What compiler are you using? gcc or g++ or something else? I don't have a *nix os so I can't really help you with that. Maybe Mike or someone else can help you.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you need to put lines 14 and 15 inside a loop. After line 15 call strlen() to get the length of the string. If the length is incorrect then loop back to line 14.

The function prototype on line 1 is not needed since it is defined in line 2. Function prototypes are only needed when a function is called before it has been defined.

line 11: The string should be a little larger than that to allow the user to enter a string of more than 10 characters, which can easily be done when using the cin >> operator. You can limit input to no more than 10 characters by using getline() instead of >>.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Don't you have the slightest idea how to write MFC program? Or use VC++? If not, then google for tutorials. I already gave you lots of links, its up to you to study and learn.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you need to allocate new memory for the array.

SendBack[x] = malloc(strlen(BUFFER)+1);
strcpy(SendBack[x], BUFFER);

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I assume you want to use pointers for mask_array[i]?

Assuming mask_array is an array of integers

int* mask_ptr = mask_array;

for(int i = 0; i < 16; i++, mask_ptr++)
    bit_a = ((*mask_ptr & a)?1:0);       

Another option
bit_a = ((*(mask_array+i) & a)?1:0);

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

vcvars32.bat doesn't know anything about the folder(s) where the SDK is installed. you will have to create another batch file that adds those paths to the environment variables or use /I<path> on the cl command line.

If you zip up the project files and email or PM them to me I'll try to compile it. (I just sent you a PM)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I assume that code is drawing an arrow on a button. If that's true then put the code in the button's OnClick event handler.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

line 31: deposit is declared as bool, so it can't contain the value shown on line 31. The test will alays be false because it can only be 1 or 0.

I compiled it on MS-Windows and didn't get any of the errors you reported. The only probledm was what I mentioned above, which is a warning not an error.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

depends on the compiler and operating system. MS-Windows use gdi print functions

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you want the arrow to appear on a button, right? Study the links I gave you and they will tell you how to do it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you could just copy the data files to an external hard drive.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I told you how in my previous post. There are all sorts of things you can do with MFC buttons -- here are some of them. Look though those links and you will probably find some example code.

Here are some google links for you to study

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you need to run vcvars32.bat found in the compiler's bin folder, similar to this (for vc++ 2012):

C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin

If you are using Windows 7 then I suspect you are trying to use an outdated SDK. Get this one. But in most cases you don't need the SDK because the compiler includes most, if not all, the windows headers and libraries that are needed. You should try to compile without reference to the SDK to see if your program will compile.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Here's a Tattoo Magazine that might interest you. I see it's also on Facebook