15,300 Posted Topics

Member Avatar for Muhammadlodhi

[QUOTE=Muhammadlodhi;1189552]i need a solution if anyone have plz[/QUOTE] Then write one yourself. Take the hints already given and start coding. Nobody here is going to write your program for you.

Member Avatar for Salem
-2
364
Member Avatar for sana zafar

If you look at any standard ascii chart you will see that every character on the keyboard has a decimal value. The digits '0' through '9' have a decimal value of 48 to 57. To convert any digit to an integer all you have to do is subtract '0' (or …

Member Avatar for sana zafar
0
189
Member Avatar for jeffrey o

[code] #include "vehicle.h" #include "vehicle_imp.h" [/code] One or both those header files define the vehicle class.

Member Avatar for Fbody
0
145
Member Avatar for WeberGer

You will be much better off using just winsock API functions. People tell me MFC CAsyncSocke and CSocket sucks canel water.

Member Avatar for WeberGer
0
152
Member Avatar for urbangeek

if(((int)str[count]>=65 && (int)str[count]<=90) || ((int)str[count]>=97 && (int)str[count]<=122)) it would make more sense like this so that you don't have to think about what the decimal values for 'A' and 'a' are. You are trying to find out if the character is A-Z or a-z, not 65-90. if( (str[count]>='A' && str[count]<='Z') …

Member Avatar for WaltP
0
167
Member Avatar for thewonderdude

The loop in the read function is incorrect. Using eof() like that will cause the last line to be read twice. Here is the standard way to code that loop [code] while( myfile >> a[i] ) ++i; [/code] >>The crazy thing is, when i give static size to the arrays, …

Member Avatar for Ancient Dragon
0
88
Member Avatar for xikkub

The error message says it all -- the Node class has a destructor but the implementation for it was never coded.

Member Avatar for chiwawa10
0
2K
Member Avatar for xcarbonx

It is not necessary to use an array. There is no requirement to display the results in columns. I would save the grades in a text file then when done entering the grades read the data file and display the results.

Member Avatar for WaltP
0
120
Member Avatar for kokiwi

>>#include <conio> There is no such file. You probably mean conio.h And what are all those notes??

Member Avatar for thomas_naveen
0
101
Member Avatar for Ancient Dragon

How are we supposed to search for something in code snippets? I tried Site Search, selected C++ Snippets but got results in all the forums EXCEPT code snippets :icon_eek: That makes the Site Search almost unusable when searching for key words in specific forums. And using DaniWeb Code Snippets link …

Member Avatar for Dani
1
153
Member Avatar for kalamku99

Post the program you have tried to write. Hint: use three integers for keyboard input -- one for hour, another for minutes, and the third for seconds.

Member Avatar for chiwawa10
0
92
Member Avatar for Xeros606

Yes of course it can. Most, if not all, c++ compilers can compile C code. Just name the file with *.c extension instead of *.cpp and the compiler will treat it as C.

Member Avatar for Ancient Dragon
0
93
Member Avatar for zandiago

>>The truth of the matter was that they returned to school as they didn't want to enter the jobs market. Maybe they should be taught a job marketable skill instead of college prep skills. Instead of chemistry teach them auto repair, iron working, welding, woodworking etc. They might get more …

Member Avatar for diafol
2
382
Member Avatar for Seapoe
Member Avatar for Seapoe
0
90
Member Avatar for Lukezzz

All MS-Windows computers have IE -- at least in USA. I've heard there have been some lawsuits about that around the world but I don't know the outcome. [icode] HINSTANCE hInstance = ShellExecute(NULL, "open", "www.google.com", NULL, NULL, SW_SHOW);[/icode] The above will use the default browser, whatever that is.

Member Avatar for Lukezzz
0
1K
Member Avatar for sree_ec

The questions depend on the platform. [URL="http://en.wikipedia.org/wiki/Calling_convention"]Here is a wiki article[/URL] The return value on Intel based computers is normally stored in the eax register then after the function returns the value is copied to some variable.

Member Avatar for sree_ec
0
86
Member Avatar for OffbeatPatriot

[QUOTE=WaltP;1146322]What amazes me is each and every company can save you hundreds by switching from one of the others. That basically means you sign up and the insurance company gives you a $300 check! Then you can switch again and get $700 from the new one. It's a really useful …

Member Avatar for jwenting
1
212
Member Avatar for jemz

AFAIK you can not delete attachments. I have wanted to do the same thing but was told that I can't.

Member Avatar for jemz
0
33
Member Avatar for tr6699

You could do it something like this, which increments the pointer by 2 on every loop iteration. [code] int main() { int array[10][2] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}; int* p = (int *)&array[0][1]; for(int i = 0; i < 10; i++) { std::cout << *p << '\n'; p += 2; } return 0; …

Member Avatar for Ancient Dragon
0
99
Member Avatar for mbrinkley

move line 26 down outside the loop to line 30. Its not necessary to calculate the average every time a number of read. Do it just once, after all numbers have been read, summed and counted. Your program may do nothing at all if the file can not be opened. …

Member Avatar for Ancient Dragon
0
119
Member Avatar for J.Killa

Don't you mean you need to use std::string's find() method? e.g. [code] std::string word = "Hello"; size_t pos = word.find('.', 0); [/code] In the above, just put it in a loop and replace the second parameter to find() with the variable pos that was returned by the previous find. Keep …

Member Avatar for J.Killa
0
304
Member Avatar for RayvenHawk

[quote]we've (the students) have already worked on compiler and interpreter design prior to this, which I haven't yet. So with that knowledge there is a chance I may need to drop the class because of this[/quote] I'm surprised your university even let you register for that class without the prerequisits.

Member Avatar for Ancient Dragon
0
101
Member Avatar for Trents

google for sort algorithms, there are several of them but the one you posted is not one of them. The easiest to code is the bubble sort.

Member Avatar for invisal
0
147
Member Avatar for ale_jrb

>>I'm also sure I read somewhere that you can't pass a class as a function argument. You must have misread it. The class in a is a new instance of the class while the class in b is the same instance. In a the class is passes by value, meaning …

Member Avatar for ale_jrb
0
103
Member Avatar for doolsta111

Look carefully -- the function prototype says the first parameter is [b]const[/b] but the actual function does not. They have to be the same.

Member Avatar for Ancient Dragon
0
126
Member Avatar for soroush68

declare two variables a and b then subtract their addresses. That is really a terrible way to do it because there is no guarentee that the two variables will be next to each other -- the compiler is free to put anything it wants between those variables. Using the sizeof …

Member Avatar for bharath404
0
257
Member Avatar for Q8iEnG

>>How to fix the problem, please? what problem?? CopyFile() parameters are [b]const char*[/b], not std::string. Call string's c_str() method to make the conversion.

Member Avatar for WaltP
0
164
Member Avatar for mauryoung

You don't need a 64-bit compiler for 64-bit operating systems (unless of course you want the compiler to generate 64-bit code). 32-bit compilers work great. I have 64-bit Windows 7 and use vc++ 2008 Express and Code::Blocks with MinGW. Both both without a problem.

Member Avatar for WaltP
0
229
Member Avatar for mithunp
Member Avatar for Covert06

See post #7 on [URL="http://forum.codecall.net/c-tutorials/9095-clear-screen-windows-console-using-api.html"]this thread[/URL]

Member Avatar for Covert06
0
195
Member Avatar for Dio1080
Member Avatar for William Byrd II

If you are going to use std::string then you have to learn to read all about what that class can do instead of being spoon-fed on some forum. google for std::string and you will find a list that tells you how to use it.

Member Avatar for chary8088
0
102
Member Avatar for vizionary2012

what you want in C is FILE structure and associated functions found in stdio.h

Member Avatar for Ancient Dragon
0
58
Member Avatar for Bart_sg

You need to use { and } between the if and else statements [code] if( something ) { // code here } else { // more code here } [/code]

Member Avatar for Mikstaslaya
0
170
Member Avatar for paradiseis

It would have been a lot better to have posted the actual code in code tags to preserve the program's format, such as tabs and spaces. I won't bother reading code that isn't at least formatted a little bit.

Member Avatar for jephthah
0
566
Member Avatar for boiishuvo

Look at the first error, fix that and several others will probably disappear the next time you compile it. For example vc++ 2008 express complained about line 18. Well, the actual problem is on the line above it -- line 16. Look carefully and you will see that it is …

Member Avatar for boiishuvo
0
138
Member Avatar for prakakat

[url]http://forum.codecall.net/c-c/27272-c-gets-function-implementation-help.html[/url]

Member Avatar for Ancient Dragon
0
87
Member Avatar for prade

dev-c++ is dead and buried. You can't even download it any more, and the web site has been taken down. Ditch it and get Code::Blocks with MinGW. AFAIK it won't do Windows Forms either.

Member Avatar for Ancient Dragon
0
87
Member Avatar for gregarion

variable [b]b[/b] is declared twice. Remove the declaration on line 11. And it should be size_t, not int

Member Avatar for mrnutty
0
155
Member Avatar for jjennings11

[code] int i; while ( i <= pow2 ) { result *= pow1; i++; } [/code] In the above code, what is the initial value of variable [b]i[/b]?

Member Avatar for jjennings11
0
112
Member Avatar for Aparna Bharath

call win32 api function CreateProcess() and you will have a lot more control over how the new process is created. Never tried it with a *.py program.

Member Avatar for Software guy
0
157
Member Avatar for mabpest

[QUOTE=mabpest;1181107]What are the primary differences between wireless voice and paging systems.[/QUOTE] One has wires and the other doesn't ?

Member Avatar for GreyWill
-1
147
Member Avatar for sharathk60

[QUOTE=gerard4143;1183804]If the compiler will generate the proper machine codes and the linker will produce the proper addresses then yes it will produce executable code....The only remaining obstacle is wrapping the executable code in a format recognized by the operating system...[/QUOTE] Isn't that the job of the linker? The program doesn't …

Member Avatar for Ancient Dragon
0
140
Member Avatar for j1krlos

[QUOTE=chrishea;1106004] Trying to go to Vista from Win 7 makes no sense.[/QUOTE] I think you have that reversed, but I agree that going from Win7 to Vista is a bad idea. People get what they pay for -- installing pirated software will get you a lot more than what you …

Member Avatar for Technocrate25
0
240
Member Avatar for cwarn23

[QUOTE=cwarn23;1175757]Yes and this thread is 12 days old and still Dani has taken no action. How long do we need to wait before such a feature will be introduced?[/QUOTE] She already has taken action. This topic has been discusses several times over the last 5 years that I have been …

Member Avatar for WaltP
0
355
Member Avatar for jprogram

>>if ( bad = true ) You need to use the boolean operator == instead of the assignment operator =. That is a common error made by people coming from other languages such as VB which use = to be either assignment of boolean.

Member Avatar for Ancient Dragon
0
94
Member Avatar for sadsack

you have to make the program pause before it exits back to the operating system. [code] #include <stdio.h> int main() { system("pause"); return 0; } [/code]

Member Avatar for Ancient Dragon
0
215
Member Avatar for jephthah

32-bit vc++ 2008 express on 64-bit Win7 doesn't have that problem. [code] #include <iostream> #include <limits> #include <string> #include <iomanip> using namespace std; int main() { // use textual representation for bool cout << boolalpha; // print maximum of floating-point types cout << "max(float): " << numeric_limits<float>::max() << endl; cout …

Member Avatar for Ancient Dragon
0
214
Member Avatar for hurricane123

Homework? You answer the questions and we will tell you whether you are right or wrong.

Member Avatar for Ancient Dragon
0
72
Member Avatar for Xufyan

are you trying to print all the odd numbers between two values? Your program is doing much too much work! It only needs one loop, not two. Delete that second loop and just test if the loop counter d is even or odd.

Member Avatar for jephthah
0
148

The End.