15,300 Posted Topics
Re: I assume you are using \*nix os, so if you get a core dump then run gdb or another debugger that will tell you where the problem is assuming you compile your program for debug. | |
Re: You don't need arrays or while loops. Just use three simple for loops. The first counts the number of rows, which is 6. The second displays space(s) to move the cursor on the screen, and the third displays the letters in reverse order that they appear in the alphabet. loop … | |
Re: What language is the software written in? There are hundreds of them. What you should do next depends on the language. Some languages such as html and java are interpreted when they are run, others such as c, c++, c#, and VB require a compiler to translate the text file … | |
Re: The smallest unit of storage in a computer is one byte. What you want to do is to bitmap the byte(s) of memory, one byte normally holds 8 bits (but may vary depending on the operating system). So if you want an 8x8 matrix of bit then use an array … | |
Re: Are you trying to run MinGW under a linux emulator? You probably don't have permissions to run MinGW from within c:/users/mat folder. Move MinGW to C:/MinGW then make sure to grant access to everyone then try again. | |
Re: int and const int are not the same thing -- int is a variable that can change a runtime from one value to another, while const int may not even be given storage because the compiler may just treat it as if it were a macro by inserting its value … | |
Re: If you want cross-platform then use c++ [boost libraries](http://www.boost.org/doc/libs/1_51_0/libs/filesystem/doc/index.htm) | |
Re: The problem you see is that c++ stream library may or may not be thread safe meaning that you might see almost any random output or a mixture of the two. Read [this thread ](http://stackoverflow.com/questions/6374264/is-cout-synchronized-thread-safe)for more information. If you want specific output then you will have to add thread synchronization … | |
![]() | Re: They probably need to escapt the \& symbol [edit]. well, according to the line above & doesn't need to be escaped, so I have no idea what the problem is. ![]() |
Re: yes it is opossible, how to do it depends on the operating system. For MS-Windows you need to learn win32 api functions. [Here is a good tutorial](http://winprog.org/tutorial/http://winprog.org/tutorial/). After you have learned that you can start learning [MS-Windows GDI functions](http://msdn.microsoft.com/en-us/library/aa923590.aspx) | |
Re: The first thing you need to do is split up the Hotel class into three different classes 1. GuestInfo 2. RoomInfo 3. Hotel class Hotel should contain an array or vector of RoomInfo classes class RoomInfo should contain an array or vector of GuestInfo classes, as well as the room … | |
Re: I just googled for it and found [this tutorial](http://www.johndcook.com/cpp_regex.html) as the very first hit | |
Re: > int raw_len = sizeof(MyTest_u_char2) + 1; That line is wrong -- sizeof takes the size of a pointer, not the number of bytes allocated to the pointer. In this case sizeof(any pointer) is 4 (in most implementations today but could be some other value depending on your compiler). What … | |
Re: You need to do socket program to send/receive over the internet. Exactly how it's done is operating system dependent, e.g. MS-Windows see turotials for winsock, for \*nix there is POSIX sockets. There is lots of into on the net about both which you can easily find by googling. Hardware isn't … | |
Re: Can you choose to specialize in more than one of those? If yes, then specialize in all that interest you. BTW Oracle, Cisco and .NET are completly different thigs, that is, Oricle is an SQL database while .NET is a program environment, there probably is a .NET verson of Oracle. … | |
Re: >can you please write a program for me Nice of you to ask, but No, we are not here to do your homework for you. | |
Re: if you want to copy the arrays that are declared in oneFunction() into the arrays declared in twoFunction() then onefunction() will have to call twofunction() passing it the two arrays. twofunction() will need two parameters, not one. | |
Re: There are several higher-level c++ alternatives, such as C#, Windows Forms (which is CLI/C++), MFC, wxWindows, QT (cross-platform) just to mention a few. C#, WF, and MFC you will want to use Microsoft's VC++ 20?? compiler/IDE. | |
Re: Kind of hard to say what the problem is without knowing the declaration of variables. | |
Re: Maybe a map is not the best way to go about that. Another way is to create a structure that contains a string for the argv entry and int for counter, then create a vector of those structures. After that, just call std::sort() to sort any way you want it. | |
Re: If the OP is from India he may not have any other choice but to use Turbo C/C++ because sadly that's what is taught in their universities. | |
Re: [wprinf()](http://msdn.microsoft.com/en-us/library/wc7014hz(v=vs.80).aspx) and related functions work with unicode characters. You may have to change the [code page](http://msdn.microsoft.com/en-us/library/2x8et5ee(v=vs.71)) in order for other languages to display correctly. | |
![]() | |
Re: >Any idea as to how this question should be done . Yes -- find out how to use magick++ | |
Re: xcode is for MAC, not MS-Windows. | |
Re: line 17 should be moved up so that its within the bracketed if statement that starts on line 13. | |
Re: Attempting to do it a "portable" way is useless becuse \*nix doesn't support DLLs, instead it has shared libraries with \*.so exension. >Also is there a way I can program for linux on windows? Only if you run \*nix in a virtual machine window and use a compiler for \*nix … | |
Re: >Bruce was also thought of as a gay name Don't let [Bruce Willis](http://www.guardian.co.uk/technology/blog/2012/sep/03/no-apple-bruce-willis) hear that! | |
![]() | Re: >please make this thread as "must read" There is only one MUST READ thread and that's the DaniWeb Rules. All others are optional just as this one should be. >Just share that what have you all done in your universities/scholl time which made you to come to this level of … |
Re: Read about cgi programs, a short tutorial is[ here](http://www.geekdaily.net/2007/08/06/c-a-basic-cgi-tutorial/) | |
Re: It was much simpler and safer to just use CODE tags. That way your algorithm wouldn't have to guess about what is or is not code, and sometimes it guesses wrong. | |
Re: From what little I've read about it [here](http://www.nongnu.org/pngpp/doc/0.2.5/) you shuld prolbably use [Code::Blocks with MinGW](http://www.codeblocks.org/downloads), which is the windows port of GCC because png++ is documented to work with gcc and not VC++. That's not to say you can not use vc++, just that the port will be easier with … | |
Re: >Can someone tell me how to write You already answered your own question. | |
Re: maybe line 6 should have been this: tmp = new int[nCards+1]; | |
Re: what "issues" and what function? If there are compiler errors then post a few of them. | |
Re: write your own similar [to this](http://www.cplusplus.com/reference/clibrary/cstdlib/itoa/). You won't need to write a complete implementation if all you need it to convert an integer to string. In that case its the same as atoi() | |
Re: instead of all that shifting I just store it in a char array then xmit the array inx x = -123; unsigned char buf[sizeof(int)]; memcpy(buf,&x,sizeof(int); // now just xmit buf Serial.write(buf,sizeof(buf)); // C++ code to convert the captured bytes back into a long integer int x; memcpy(&x,buf,sizeof(int)); // or this … | |
Re: >how can i link my file to this question? One of the items in the purple ribbon above the edit box is Files -- click that link. | |
Re: The first problem is the program is attempting to change data that is stored in read-only memory. String literals can't be changed. You can correct that by storing the string in read-write memory like this: char data[]="ALOK KUMAR ASHISH KUMAR ANKUSH After that you will want to set pointer t … | |
![]() | Re: Most likely because there has already been enough said on that thread. It's all about suggestions -- take it or leave it, that's your choice. |
Re: Is the code beginning on line 21 of Intro.h really in intro.h or is that just a posting mistake? It should be in a file named intro.cpp. If you really have it in intro.h then that is a problem, remove it and put it in intro.cpp. As for the undefined … | |
Re: you need a semicolon ; at the end of the class declaration in the header files. Also, in the \*.cpp files, remove the semicolon before using namespace std statement class foo { // stuff here }; // <<<<<< | |
Re: computer science is compatable with almost all other fields, and at least some knowledge of other fields is required because programmers and computer scientists don't work/live in a vacuum. To answer your question, yes I can see a double major of computer science and mechanical engineering. | |
Re: >int bsort(int Ar[], int count, int swc) Are you required to use that or did you make it up yourself? I would have passed count and swc by reference so that the bsort() can change it for main(). Then in main() you don't call bsort() in a loop, but only … | |
Re: I think its time for you to get a new one. | |
Re: look into [boost filesystem](http://www.boost.org/doc/libs/1_51_0/libs/filesystem/doc/index.htm) which is cross-platform | |
Re: yes. For small programs like you might write in first year programming courses it doesn't really matter a whole lot, unless of course you are learning how to write functions. They become very important in larger programs to keep the functions small and understandable. |
The End.