Forum: C 15 Days Ago |
| Replies: 6 Views: 387 There are only two ways to get it like that:
Pay someone to write it for you. That will cost you some $$$
Learn to write it yourself.
I have not the time to write it for you. |
Forum: C 17 Days Ago |
| Replies: 7 Views: 406 If you are using VC++ 2008 (or earlier) you can easily view the entire contents of that buffer without resorting to putting that kind of debug code in your program. Not sure if Code::Blocks will do... |
Forum: C++ 18 Days Ago |
| Replies: 3 Views: 230 I've looked at the assembly code quite a bit and have found it contains very little "useless junk". But you can have it produce assembly code listing if you want. Look in the c++ options and there... |
Forum: C 18 Days Ago |
| Replies: 2 Views: 310 Function add() -- second parameter must also be passed by reference. You are just passing the pointer by value, which does nothing in main()'s copy of the pointer. Note the second parameter should... |
Forum: C 18 Days Ago |
| Replies: 3 Views: 474 line 67: amic is an ininitialized pointer. |
Forum: C 19 Days Ago |
| Replies: 7 Views: 406 >>for(int i = 0; i < strlen(buffer); i++)
buffer is NOT a null-terminated string, so strlen() can/will not work with it. The buffer you created is just an array of characters, and memset set each... |
Forum: C++ 19 Days Ago |
| Replies: 1 Views: 216 vector doesn't have a find() method. Maybe what you want is std::map instead of two vectors. |
Forum: C 19 Days Ago |
| Replies: 2 Views: 323 you can not convert an integer to character array like you tried to do. Use sprintf() instead
sprintf(t, "%ld", i); |
Forum: C 19 Days Ago |
| Replies: 5 Views: 373 1) you failed to read Aia's comment.
2) The printf() statement is incorrect. %s is for a charcter array, shape is not a character array. What you want os %c |
Forum: C++ 19 Days Ago |
| Replies: 2 Views: 227 Using TurboC++ is like riding horse&buggy on todays interstates or autobahns (in europe). Ditch the horse&buggy and get a free modern ferrari. |
Forum: C++ 19 Days Ago |
| Replies: 6 Views: 293 Now you are using yet another new object that you have not told us about. What is m_pVect2Grid?? Please refrain from introducing new objects without defining them for use. |
Forum: C 19 Days Ago |
| Replies: 1 Views: 237 First you have to define the term "microarray data". We are programmers, not biologists. |
Forum: C 19 Days Ago |
| Replies: 5 Views: 373 >>if (length=breadth)
you are using the wrong operator -- use == boolean operator instead of = assignment operator.
>> shape= 'square';
Two problems with that line
All strings (two or... |
Forum: C++ 19 Days Ago |
| Replies: 7 Views: 343 If you are using a 32-bit compiler on either MS-Windows or *nix then forget those two functions because they are not implemented by any 32-bit/64-bit compiler. The operating system will not permit... |
Forum: C++ 19 Days Ago |
| Replies: 6 Views: 293 >>Vector2<float> m_pVec2Stage[150];
Most likely that line. vectors are by definition arrays. So all you probably need is this: Vector2<float> m_pVec2Stage;. But of course we can't be certain... |
Forum: C++ 20 Days Ago |
| Replies: 10 Views: 544 lines 22 and 25: delete the [/icode]= " "[/icode] There is no value to initializing the strings with a single space.
line 25: delete that line because it has no value.
line 48: useless. ... |
Forum: C 20 Days Ago |
| Replies: 7 Views: 406 cout only works with text buffers -- your buffer contains binary information and most likely the very first byte is a 0. |
Forum: C++ 20 Days Ago |
| Replies: 10 Views: 544 simple colution
int main()
{
int num;
char chars[] = "abcdefghijklmnopqrstuvwxyz";
cout << "How many strings do you want to create?\n";
cin >> num;
long n = 0;
... |
Forum: C++ 20 Days Ago |
| Replies: 3 Views: 246 On my computer Alt+2 generages '☻', not ^B |
Forum: C++ 20 Days Ago |
| Replies: 2 Views: 186 It should exchange the value of the two variable parameters. The two parameters are passed by reference (http://www.brpreiss.com/books/opus4/html/page593.html) so that swap() can change them and the... |
Forum: C 20 Days Ago |
| Replies: 3 Views: 248 >>is it a standard one?
Yes -- all compilers are required to implement it like that. Here (http://en.wikipedia.org/wiki/ANSI_C) is info about ansi c standards
>>the array name cannot be changed... |
Forum: C++ 21 Days Ago |
| Replies: 6 Views: 271 You can solve for pc first in a similar manner that I posted. I think the problem in ComputerMove() is that if a square is already eith 'x' or 'o' you need to generate another random number and try... |
Forum: C++ 21 Days Ago |
| Replies: 5 Views: 358 It doesn't make a lick of sense to write a custom print function for every conceivable data type using printf() or fprintf(). cout, ofstream and ifstream already have overloaded functions that do it... |
Forum: C++ 21 Days Ago |
| Replies: 6 Views: 271 This minor change made it work when I move first
if (choice==1) //if player wishes to go first
{
bool done = false;
do{
... |
Forum: C 21 Days Ago |
| Replies: 10 Views: 525 Oh I see -- I guess I misunderstood. You would have to sort the list after it was finished. When sorting linked lists just exchange the actual data, not the entire nodes, to preserve the link... |
Forum: C 21 Days Ago |
| Replies: 3 Views: 277 If all you want to do is run that program once when what' the point of making the text file into a fixed-length records? Such a scheme would limit the usefullness of your program. |
Forum: C 21 Days Ago |
| Replies: 2 Views: 312 where is your code? No one here will write that program for you. |
Forum: C++ 21 Days Ago |
| Replies: 2 Views: 262 what compiler are you using? I compiled/ran with vc++ 2008 express and your first program worked ok. |
Forum: C 21 Days Ago |
| Replies: 10 Views: 525 Change AddWord() to add the new node in ascending or descending order. Then you won't have to bother about sorting later. |
Forum: C 21 Days Ago |
| Replies: 5 Views: 567 1) remove conio.h -- its non'standard and not implemented by very many compilers. Code snippets should not use compiler-specific stuff.
2) delete all those global variables on lines 12 and 13. ... |
Forum: C++ 21 Days Ago |
| Replies: 2 Views: 205 >>mysql_result[3000][2]=msq_row;
If you programmed the rest of that then you should probably know that the above like doesn't work. You should be reading this tutorial... |
Forum: C++ 21 Days Ago |
| Replies: 15 Views: 536 Why didn't you just convert flavor to lower case instead of creating yet another variable? |
Forum: C++ 21 Days Ago |
| Replies: 6 Views: 498 >>The changes you mentioned have been made except for changing ! == to !=. For some reason, my compiler is not liking !=. I get the error "ISO C++ forbids comparison between pointer & integer". I'm... |
Forum: C++ 21 Days Ago |
| Replies: 11 Views: 317 could be re-written like this: Notice you don't need || at all. And that function should only have a return statement at the end of the function, not on every line.
char grade;
... |
Forum: C 21 Days Ago |
| Replies: 3 Views: 277 You don't have to store all the lines, just the two lines that you want to compare. Sequentially read the file, counting lines as you go along then save only the two lines you want to compare. |
Forum: C++ 21 Days Ago |
| Replies: 6 Views: 498 line 7 and 8 of the read function: Line 8 is unnecessary because line 7 opens the file when the stream is declared.
line 12: if lastname never contains spaces then use use >> operator instead... |
Forum: C++ 22 Days Ago |
| Replies: 7 Views: 429 c++ has std::string that is declared in <string> header file. google for std::string and you will find links that describe all its methods. |
Forum: C++ 22 Days Ago |
| Replies: 7 Views: 429 There are two problems on each of those lines
1) one, two, three, etc are not defined in that function.
2) char is a data type, but you failed to provide a variable name. For example char... |
Forum: C++ 22 Days Ago |
| Replies: 9 Views: 366 void swap(int* int1, int* int2)
{
int temp = *int1;
*int2 = *int1;
*int1 = temp;
}
void sort(int int1, int int2, int int3)
{ |
Forum: C++ 22 Days Ago |
| Replies: 4 Views: 271 Deposit $10,000.00 USD in my paypal account and I'll do it for you. Otherwise you will just have to write the program yourself. |