Posts
 
Reputation
Joined
Last Seen
Ranked #302
Strength to Increase Rep
+8
Strength to Decrease Rep
-2
100% Quality Score
Upvotes Received
17
Posts with Upvotes
15
Upvoting Members
12
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
14 Commented Posts
0 Endorsements
Ranked #377
~78.8K People Reached
Favorite Forums
Favorite Tags
Member Avatar for rodeostar04
Member Avatar for justinlake888

Here's an idea: First check is your number teen, or not. If it is teen number (1 is first digit) then check second digit and write: [CODE=cplusplus] //just for example case 1: str = "Eleven"; break; case 2: str = "Twelve"; break; //... [/CODE] if it's not teen number, then …

Member Avatar for hermel
0
2K
Member Avatar for themaestro

[QUOTE=themaestro;1353847]Thanks for the reply. The code above only writes "time exceeded" after the person has finished the quiz. Is it possible to prompt the command even if the user doesnt enter anything? Lets say he's only less than halfway through the quiz.[/QUOTE] It is possible, and it is called "threading". …

Member Avatar for viorel994
0
3K
Member Avatar for cam875
Member Avatar for jared_masc

And yet, scanf can be clever function: [CODE=c] #include <stdio.h> int main(){ char dump, string[40]; printf("Enter whole sentece (yeah, bring spaces too, I can handle it):\n"); scanf ("%[^\n]", string); scanf("%c", &dump); printf ("You entered: %s", string); return 0; } [/CODE]

Member Avatar for deceptikon
0
5K
Member Avatar for onemanclapping

Unix has various flags. It doesn't have to do with makefiles. Try writing instead of _UNIX: _unix, unix, _UNIX_, UNIX... etc... The best thing is: see what compiler are you using, and then look at its documentation, because compilers are setting those flags, and different compilers name different names (for …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for davidTechy

1. You are making memory leaks all over the place. When you operate with dynamic memory allocation you have the responsibility to free every part of memory that you don't use. 2. Instead of [ICODE]void main()[/ICODE] always write [ICODE]int main()[/ICODE] 3. myRemove() isn't working. Why are you creating a new …

Member Avatar for WaltP
0
3K
Member Avatar for animefun2

>I'm using Visual C++ and doesnt give me any compilation error it keeps giving me a run time error after i enter the 1st number i can't figure out whats wrong :S help?[/QUOTE] The only reason this code should give you error is if you input something else that float, …

Member Avatar for abhishekjha
0
256
Member Avatar for Trekker182

I guess you defined float stars[20][20]? You can't write stars[i] + stars[j], because you have to write two dimensions (two brackets): stars[i][j]... always. hth

Member Avatar for raptr_dflo
0
252
Member Avatar for n8thatsme

Never test end of file with .eof()!!! It's wrong. Instead, replace [ICODE]!indata.eof()[/ICODE] with [ICODE](indata>>info)[/ICODE] (and of course, remove same line after while)

Member Avatar for mike_2000_17
1
4K
Member Avatar for Hatem Faheem

Line 8 of your code is: string constructor (string str, int number) Line 9 of your code is: string constructor (char* arr, int number) It's been awhile since I wrote in c++, but i think you can understand this. The point is that if you type "Initial", that's not object, …

Member Avatar for Hatem Faheem
0
105
Member Avatar for totalwar235

Have you called srand()? You need to seed the numbers first. You can look at this example: [URL="http://www.cplusplus.com/reference/clibrary/cstdlib/rand/"]cpp useful webpage[/URL] EDIT: ok, I see srand now :D... Try to break your code a bit... segment by segment, to pinpoint exactly where it goes wrong... For example, try to print rand(), …

Member Avatar for totalwar235
0
143
Member Avatar for Sci@phy

Hello. I've just started learning Python and I have a few questions. I'm using my program to communicate with some device through serial port using serial.py library. It's all going really fine. I've got a class device, and I'm using it to communicate with a device (logical ;) ). Q: …

Member Avatar for Sci@phy
0
108
Member Avatar for staufa

It should be like this (yeah, I like writing nonesence): [CODE=c] int i = 0; while ((string[i++] = getchar())!='\n'); string[i]='\0'; [/CODE]

Member Avatar for cthoes
0
323
Member Avatar for smnadig

You could write your hex-to-deci function, and then you can simply write [ICODE]char a = hex-to-deci-function(hex_num)[/ICODE]

Member Avatar for ArkM
0
1K
Member Avatar for sambafriends

[QUOTE=sambafriends;727086]thanx for replay can u explain briefly I used void so, there is no need to return any value[/QUOTE] You can drive your car without fastening seat belt, or walk through minefield :) But it's risky! So always use [ICODE]int main()[/ICODE] and return zero if succesful (in which case you …

Member Avatar for sambafriends
0
274
Member Avatar for asmNewbie

If you are running it under Windows XP CMD than it will only affect that window, because XP just simulates command prompt, doesn't load real one. So, answer to your question, if you are running XP, is NO

Member Avatar for jbennet
0
229
Member Avatar for Elmismo

Please post at least head of your header file... Until then, this: [URL="http://msdn.microsoft.com/en-us/library/f6xx1b1z(VS.71).aspx"]googleing![/URL] says this: [QUOTE]Linker Tools Error LNK2001 unresolved external symbol "symbol" Code references something (such as a function, variable, or label) that the linker can't find in the libraries and object files. Possible causes * What the code …

Member Avatar for ArkM
0
365
Member Avatar for d1s_0n3_guy
Member Avatar for JpegUser

Problem is you are going both ways! You are incrementing i iterator and at same time decrementing ptr_size2. Write something like: [CODE=C] ptr_size2 = ptr_size; temp = ptr; while (ptr_size2>=0) { temp[ptr_size-ptr_size2]=ptr[ptr_size2--]; }[/CODE]

Member Avatar for JpegUser
0
124
Member Avatar for n3XusSLO

AFAIK brackets can be used without any function or if statement, simply as code-block. They just come in handy for functions, classes, etc.

Member Avatar for Lerner
0
191
Member Avatar for britishemo15

why do you need kbhit? kbhit works more like a detector if key is pressed, it doesn't wait for keypress. Simply use getch?

Member Avatar for MosaicFuneral
0
1K
Member Avatar for clutchkiller
Member Avatar for Gannon56789

What does Earray point to? You've made it to null pointer: [ICODE]Earray[i] = 0 //like NULL[/ICODE] And your EmpPointer is unused... Seems like to me you're trying to allocate 2D array of some sort, but doing it wrong

Member Avatar for Agni
0
209
Member Avatar for The Dark Knight

hmm... write your own mul using logical operators and and or? I'm a beginner too, so don't really know how, but I'd try something with that Although it's not elegant solution

Member Avatar for carson myers
0
92
Member Avatar for hellIon

It works on my Dev-cpp (mingw, gcc) compiler, and I can't see any problem with code, so it's probably something about your compiler.

Member Avatar for Narue
0
131
Member Avatar for NinjaLink

Well, you obvioulsy need to increment counter each time you add a node, and decrement it each time you remove a node. It's really not hard, just put it in insert, delete, and create list. For checking if list is empty... simply check if first==NULL. But don't you need some …

Member Avatar for ArkM
0
3K
Member Avatar for Sci@phy

Hi! I have the following code: [CODE=asm] mov al, 5d neg al[/CODE] When it executes, CF = SF = AF = 1 Ok, I think I understand why AF (number is bigger than 00001111b ?), SF (most significant bit is now 1 not 0) But what I don't understand is …

0
116
Member Avatar for minas1

Make pointer to pointer [ICODE]**ptr[/ICODE], and allocate n pointers to it. Then to each of that n pointers [ICODE]*ptr[i][/ICODE] allocate n int's (or whatever). After that you can use it as regular 2D array: [ICODE]ptr[i][j][/ICODE]

Member Avatar for ArkM
0
122
Member Avatar for Sci@phy

Hello to all of you! I would really appreciate somebody telling me complete step by step tutorial how to work with MASM (or TASM, but I haven't noticed it's free to download) I've tried myself MASM and TASM (some Telemark assembly, not Borland), but for some reason it won't work, …

Member Avatar for NotNull
0
115