15,300 Posted Topics

Member Avatar for musicmancanora4

use atoi() to convert ascii to integer, then use sprintf with "%x" format argument to convert the integer to hex string.

Member Avatar for Lerner
0
138
Member Avatar for brale
Member Avatar for harry5341
0
70
Member Avatar for RossSCann
Member Avatar for RossSCann
0
131
Member Avatar for spacecowboy123
Member Avatar for Debadipta

select File --> New --> Project, then just follow the prompts in the dialog boxes, select Win32 console application radio button. The IDE will create the project with a *.cpp and *.h files. After than, select menu Build --> Build Solution.

Member Avatar for Ancient Dragon
0
76
Member Avatar for gabs

do you have your compiler set up to define UNICODE and _UNICODE macros? Otherwise, I don't know a thing about Chinese language. Also, [URL="http://www.tek-tips.com/viewthread.cfm?qid=1329439&page=2"]here[/URL] is something I found with [URL="http://www.google.com/search?hl=en&q=c%2B%2B+program+that+uses+chinese+characters"]google[/URL]. It appears your computer needs to have Chinese language installed.

Member Avatar for thekashyap
0
131
Member Avatar for paeez

inline code such a the remove() function should be limited to just one or two lines of code. Anything larger should be put in the implementation *.cpp file.

Member Avatar for ~s.o.s~
0
126
Member Avatar for Brent.tc

Here is another example [code=c] #include <windows.h> #include <iostream> using namespace std; int main() { HKEY hKey = 0; char buf[255] = {0}; DWORD dwType = 0; DWORD dwBufSize = sizeof(buf); const char* subkey = "Software\\Microsoft\\Office\\PowerPoint\\AddIns\\MultiMgrAddIn.AddInDesigner1"; if( RegOpenKey(HKEY_LOCAL_MACHINE,subkey,&hKey) == ERROR_SUCCESS) { dwType = REG_SZ; if( RegQueryValueEx(hKey,"Description",0, &dwType, (BYTE*)buf, &dwBufSize) == …

Member Avatar for ~s.o.s~
0
3K
Member Avatar for MattTobin

I don't get any errors or warnings when compiled with my compiler -- VC++ 2005 Pro. Maybe you don't have your project set up correctly. Your code is ok.

Member Avatar for MattTobin
0
111
Member Avatar for stringgader

[URL="http://www.daniweb.com/techtalkforums/thread23641.html"]Here[/URL]

Member Avatar for stringgader
0
296
Member Avatar for olaolu

why don't you toss that horrible QBASIC and use something more modern, like the free Visual Basic 2005 Express. Its free for the downloading from Microsoft site. You can do all the printing your heart desires :)

Member Avatar for linux
0
112
Member Avatar for ctrohana

> char *data2=malloc(strlen(data)); > memset(data2, 0, sizeof data); So if data is an array of 50 chars, and it currently has a 5 character string in it, you allocate 5 bytes, but clear 50. This is not good. Actually it is clearing only 4 bytes on 32-bit os and compiler …

Member Avatar for Salem
0
133
Member Avatar for flageolet

>>I thought the void ment no variable-values are taken to the separate function and none are returned. It does mean that -- and the function is working as expected. But the [b]void[/b] does NOT mean the function can't change global data. >>test[10] = test[10] + 1; array [b]test[/b] only has …

Member Avatar for WaltP
0
119
Member Avatar for proxystub

[QUOTE=proxystub;326201]although Ive opened the file using object.open("") the condition to check that there is indeed an open file always fails and i get my else message "file could not be found"[/QUOTE] make sure the file d.txt is in the same directory (folder) as that the executable file is running. If …

Member Avatar for proxystub
0
124
Member Avatar for niyiment

please read the sticky posts (the threads with [b]ReadMe[/b] in front of the subject) at the top of this board -- they contain a wealth of information for you.

Member Avatar for Lazaro Claiborn
0
84
Member Avatar for arfmal

something like this example?? [code] vector<stirng> array1; vector<string> array2; array1.push_back("Hello World"); // copy the first string in array1 into array2 array2.push_back(array1[0]); [/code]

Member Avatar for thekashyap
0
248
Member Avatar for nayrb

never ever include one *.cpp file inside another one. #include's are only for header files with *.h extension and often with no extension at all. If your program consists of two or more *.cpp files then each file should be compiled as a distinct unit then finally all object files …

Member Avatar for John A
0
110
Member Avatar for chubbywubba

you have mis-matched curly braces. The open brace on the do-loop is matched to the last close brace in the function. This is one reason I always place curly braces on lines by themselves so that they are easy to spot and match up. Some compilers IDEs and code editors, …

Member Avatar for thekashyap
0
129
Member Avatar for exotic_ang

I'm not a pascal prpgrammer so I can't write the program for you, but it will be the same in any language. First create three string objects called month, day and year then use substring (or something similar) that will extract the appropriate digits from the original string into each …

Member Avatar for linux
0
219
Member Avatar for mattyd

[URL="http://www.arrakis.co.uk/movie.html"]Dune[/URL] my favorite si-fi movie. Dr Who my favorite si-fi tv series. We in US just saw the first epesode of Robbin Hood on BBC America last night. Looks like it will be a good series.

Member Avatar for tins
0
102
Member Avatar for RaCheer

>> don't know how to separate it like this. see [URL="http://www.cs.cf.ac.uk/Dave/C/node17.html"]frexp()[/URL] in math.h

Member Avatar for WaltP
0
3K
Member Avatar for endsamsara

First you need to declare a 2-dimensional character array whose dimensions can be allocated at runtime. [inlinecode]char **array = 0;[/inlinecode] Next, after opening the input file read the first line which is the number of words in the array. That tells you the number of rows (the first dimension) to …

Member Avatar for WaltP
0
166
Member Avatar for mattyd

[quote] [color=red]>If the world stopped having sex all together, what do you think would happen?< [/color] That's pretty hypothetical, but it would probably increase the amount of conflicts and even wars. As those horny guys in charge of militaries around the world got more sexually frustrated than they already are, …

Member Avatar for tins
0
63
Member Avatar for jbennet

some of those registered users are really spammers whose posts have been deleted. I don't know if banned users are counted in that number or not. Some people register for the sole purpose of posting spam and have no intention of participating in DaniWeb community.

Member Avatar for WaltP
0
530
Member Avatar for covington_c

It would help if you would learn how to use tabs and spaces correctly so that your program is easier to read/understand. As it is few people, if anyone at all, will bother to read it. And what are lines 9 through 11 supposed to do? Must be a copy/paste …

Member Avatar for WaltP
0
159
Member Avatar for MattEvans

>>The nature of this application is that it needs to be extremely fast. So shaving nanoseconds is important to a degree. If speed is that important then don't use c++, but use C instead. And code in assembly when needed to optimize some time-consuming algorithms. I don't think virtuals make …

Member Avatar for thekashyap
0
119
Member Avatar for RisTar

first I would create an array of 126 integers because there are at most 126 possible characters on the standard keyboard. Initialize all ints to 0. Then loop through the array and use each character as an intex into the array so that its element can be incremented. When done, …

Member Avatar for ~s.o.s~
0
134
Member Avatar for Rimm

you have to post code because I can not see your monitor from where I am sitting :) The most common reason the window closes quickly is because you did not add any code to make the window stop so that you can read it. If you are coding C …

Member Avatar for Rimm
0
78
Member Avatar for torbecire

If you are compiling a.cpp what makes you think a.h is not being included?

Member Avatar for Ancient Dragon
0
133
Member Avatar for RobertNashon

>>There is a problem in the execution of cl.e file No, there is nothing wrong with the compiler. Your program is really quite a mess. I tried compiling it with VC++ 2005 Express and got trillions of errors. Correct the problems one error message at a time. Recompile your program …

Member Avatar for dwks
0
195
Member Avatar for MiloTN

>> if ( (file_pointer = fopen(filename, "rb")) == NULL ) The program should be open for reading a text file not a binary file -- "rt" not "rb". [inlinecode]for( j = i; j >= 0; j-- )[/inlinecode] j should start at (i-1) because the ith row at that point does …

Member Avatar for dwks
0
132
Member Avatar for ajay kandari

[inlinecode]void values(int a[4]);[/inlinecode] That is a function prototype that tells you and the compiler that function [b]values[/b] will have one argument and the argument is an array of 4 integers. [inlinecode]values(x[4]); (cannot convert int to int* and type mismatch in parameter 'a' in call to'value(int *)'[/inlinecode] Here you are not …

Member Avatar for Ancient Dragon
0
92
Member Avatar for japat

modf() will help you split a floating point number into its integer and fractional parts. see [URL="http://www.die.net/doc/linux/man/man3/modf.3.html"]man pages [/URL]for more details8

Member Avatar for Ancient Dragon
0
74
Member Avatar for bploog

argv[0] parameter in main contains that info. [code] int main(int argc, char *argv[]) { printf("%s\n", argv[0]); return 0; } [/code]

Member Avatar for bploog
0
246
Member Avatar for dahlia_06

>>t of all, is it called a This pointer or a This operator? [b]this[/b] is a pointer. An operator is something else. c;ass pbkects are [b]private[/b] by default. If you want to make them [b]public[/b] then you need to specify it. functions need to have a return type, c++ does …

Member Avatar for dahlia_06
0
122
Member Avatar for kiethnt
Re: help

You didn't say but I suspect that may be an old 16-bit program that is accessing ports directly. If that is correct then you will have to rewrite the program using win32 api [URL="http://msdn2.microsoft.com/en-us/library/aa363194.aspx"]communications functions.[/URL] I think you will also find some examples in those links.

Member Avatar for vegaseat
0
100
Member Avatar for >shadow<

Yes, [URL="http://www.amazon.com/Vampire-Book-Encyclopedia-Gordon-Melton/dp/157859071X"]vampires are undead[/URL]. [URL="http://en.wikipedia.org/wiki/Undead"]The term "undead" was coined by Bram Stoker in his original book Dracula.[/URL] Wikipedia has a large list of what is normally considered undead things. Undead creatures are considered evil -- I'm not evil so I wouldn't be any undead thing.

Member Avatar for paramasivan
1
149
Member Avatar for Ancient Dragon

I don't like the new format of the threads -- a brief list of thread links at the top of each thread (I don't know what they are called). I find them annoying and almost useless, especially in Geeks Lounge where some threads have hundreds of posts. And it looks …

Member Avatar for The Dude
0
151
Member Avatar for Ancient Dragon

Has anyone successfully installed Acrobat Reader? It downloads ok, uncompresses, then gives the error message "The Temp folder is on a drive that is full or is inaccessible. ...". I used command prompt to display the values of all environment variables and the TEMP is in d:\users\<full path here>. Anyone …

Member Avatar for Ancient Dragon
1
173
Member Avatar for bosanac515

[QUOTE=christina>you;321938]Iowa is a state in the west. (of the US).[/QUOTE] Its actually in the mid-west -- that's where I was born and raised, just a few miles North of Des Moines. Iowa is a great state to be from -- a loooooooooong ways from :mrgreen:

Member Avatar for christina>you
0
105
Member Avatar for tlly

no -- you have to write your own. Makes for good practice sharpening your programming skills.:cheesy:

Member Avatar for Salem
0
128
Member Avatar for paeez
Member Avatar for tirengarfio

Select Project --> Properties expand Configuration Properties expand Linker select General category add path(s) to the libraries in "Additional Libray Directories" click Input category under Linker add library names in "Additional Dependencies"

Member Avatar for Ancient Dragon
0
101
Member Avatar for The Dude

Hey Dude -- apparently you are the only one who used an iPod :mrgreen: I don't own one either -- I just got my first cell phone for Christmas and I rarely use it.

Member Avatar for GreenDay2001
0
380
Member Avatar for torbecire

I don't have a clue what question you are asking. function ch_in_string() -- there's a lot easier way to do that. std::string has a find method [code] bool ch_in_string(char ch, string s) { return s.find(ch) == string::npos) ? true : false; } [/code]

Member Avatar for WaltP
0
100
Member Avatar for bananenflip

[QUOTE=bananenflip;321277]I'm so sorry for asking but where should I insert or save C++. I'm skilled in html css and javascript but I don't get this.[/QUOTE] Your compiler will normally create an executable file in the same directory as the source code, or possibly a sub-directory. Unlike html and java to …

Member Avatar for bananenflip
0
302
Member Avatar for chubbywubba

>>Room& Room (const Room &node) { constructors do not have return values. And you forgot the class scope operator. It should be like this: [code] Room::Room (const Room &node) {[/code] >>Room Room::operator=(const Room& node) { you forgot the reference operator in the return type which line is line 44?

Member Avatar for WaltP
0
86
Member Avatar for lasher511

[QUOTE=lasher511;320995]Yea it has only its not constantly popping up for stupid little things it only really pops up when you want to install a program that has to change settings or that has permission to wake up/unlock my computer for example my alarm clock program does this. Plus it was …

Member Avatar for TheNNS
0
193
Member Avatar for Joe689

512 * 512 * 512 * 4 = 536,870,912, or about 524 meg. Does your computer have that much RAM? Check the return value of malloc() -- it will return NULL is not enough memory to allocate.

Member Avatar for Salem
0
274
Member Avatar for moeski301

>>I've sedn how they get it to work using an array, but I can do it that way...Thanks do you mean you are not allowed to use arrays or you don't know how to use arrays ? Where does main() start? I see some exceutable code that is not inside …

Member Avatar for moeski301
0
165

The End.