1,494 Posted Topics

Member Avatar for monkeybut

Well try including the header cctype and using the function [code] int isdigit(int c) [/code]

Member Avatar for monkeybut
0
101
Member Avatar for Limiter

If you want to isntall Code::Blocks for Windows go here [url]http://sourceforge.net/projects/codeblocks/files/Binaries/10.05/Windows/codeblocks-10.05mingw-setup.exe/download[/url] It should start downloading Code::Blocks with the GNU gcc compiler...Note I would uninstall your previous Code::Blocks first.

Member Avatar for sergent
0
223
Member Avatar for coolbeanbob

If your trying to pass a function pointer, use typedef and it'll simplify your code. [code] typedef void (*myfunc)(); void thefunc(myfunc p) { //... } [/code]

Member Avatar for coolbeanbob
0
1K
Member Avatar for b3ginn3r
Member Avatar for Narue
0
11K
Member Avatar for stereomatching

Take a read here [url]http://www.newty.de/fpt/fpt.html#r_value[/url] Especially the section - 2.7 How to Return a Function Pointer ?

Member Avatar for stereomatching
0
142
Member Avatar for pce369

Maybe you could isolate one function and that function call that produces the zeros and post that...Posting ~ three hundred lines of code and saying it doesn't work - fix it please - is infuriating.

Member Avatar for pce369
-1
263
Member Avatar for phorce

Take a look at your braces in your if statement. Try this [code] bool checkNumber(int arr[], int value) { for(int i=0; (i < 10); i++) { std::cout << arr[i] << std::endl; if(value == arr[i]) { return true; } } return false; } [/code]

Member Avatar for gerard4143
0
334
Member Avatar for cesione

Hint. Don't use gets its a dangerous function. Instead use fgets(). Don't use magic numbers like 100 use a macro like [code] #define ARR_SIZE 100 [/code] Also [code] int *k; [/code] Should be [code] char *k; [/code]

Member Avatar for cesione
0
219
Member Avatar for blt007

I would read the contents of this link [url]http://www.cplusplus.com/reference/string/string/[/url] I would really pay attention when you get to the string's method find.

Member Avatar for blt007
0
630
Member Avatar for rv1990

If your an experienced programmer(Java/C++) then C# 4.0 in a Nutshell by Joseph Albahari, Ben Albahari is a good read.

Member Avatar for Kekke
0
132
Member Avatar for ayeshashahid

What part of the program are you having problems with? I ask because a C program is mostly a C++ program.

Member Avatar for ayeshashahid
0
196
Member Avatar for rcmango
Member Avatar for tahir696

Wow another on posting a homework assignment...Please read the forum rules about posting homework assignments.

Member Avatar for gerard4143
0
148
Member Avatar for Will Gresham
Member Avatar for swissknife007

Number one, The code doesn't run in a compiler. The code is compiled by the compiler so that it can run within an operating system environment. How many threads? Just one, the main thread.

Member Avatar for gerard4143
0
186
Member Avatar for sanuphilip
Member Avatar for Zssffssz

Try the escape sequence \" e.g. [code] std::cout << "this is a quote \"" << std::endl; [/code]

Member Avatar for vijayan121
0
107
Member Avatar for NoUserNameHere

If the error is in your test.h file, maybe you should post it. Oh you did. Why do you have the main function in your header file? My mistake, I didn't realize you grouped the header and object file together.

Member Avatar for vijayan121
0
73
Member Avatar for spongernz
Member Avatar for WaltP
0
122
Member Avatar for ThuggyWuggy
Member Avatar for ksm092

Your for statement is set up wrong. [code] for(int x=1, y=0; y < 5, x < 15; x++, y++) [/code] Are you sure you want your condition part of a comma operator? Try running this code. [code] #include <iostream> int main() { for (int i = 0, j = 0; …

Member Avatar for ksm092
0
113
Member Avatar for DmytriE

If the memory manager can fulfill the malloc request it will return a memory pointer to the allocated memory...if it fails it returns NULL. If malloc returns a pointer other than NULL then you have your requested memory.

Member Avatar for DmytriE
0
118
Member Avatar for Leaningnew

This link may give you some preliminary information. [url]http://en.wikipedia.org/wiki/64-bit[/url]

Member Avatar for sergent
0
184
Member Avatar for Will Gresham

The problem is line 13 [code] _matrix.GetM(i, k) [/code] The vector container has no method called GetM().

Member Avatar for JasonHippy
0
163
Member Avatar for bennetk2

Wow what compiler are you using? I can't believe this wasn't flagged. [code] string input(string a[], int &cnt) { for (int i = 0; !infile.eof(); i++) { getline(infile, a[i]); cnt = i; } } string copy(string a[], string b[], int cnt) { for (int i = 0; i < cnt; …

Member Avatar for vidit_X
0
994
Member Avatar for neeraj goswami
Member Avatar for zzou
Member Avatar for bckc

You could check the sticky in this section 'Starting C'. I just noticed it today.

Member Avatar for cse.avinash
0
178
Member Avatar for syaminismail
Member Avatar for niyasc
Member Avatar for bmanzana
Member Avatar for dospy

Pointers that are not set to NULL or a valid memory address are said to be wild pointers, they may be pointing at anything so are very dangerous. The general rule is - Set a pointer to a valid memory address or set it to NULL...Always keep your pointers in …

Member Avatar for dospy
0
104
Member Avatar for caut_baia

I know the GNU g++ complier has limited support with the -std=gnu++0x switch.

Member Avatar for caut_baia
0
443
Member Avatar for dospy

All I can tell you is, get a good book on the subject. Here's a website, check some of the titles. [url]http://www.cs.purdue.edu/homes/dec/netbooks.html[/url] especially - Internetworking With TCP/IP Volume III: Client-Server Programming and Applications, Linux/POSIX Socket Version (with D. Stevens)

Member Avatar for dospy
0
168
Member Avatar for ryl

And array is just a contiguous block of memory. Its doesn't support the division operator.

Member Avatar for ryl
0
137
Member Avatar for jmay1327
Member Avatar for jmay1327
0
140
Member Avatar for I am dumb

I would investigate the do-while loop [url]http://msdn.microsoft.com/en-us/library/b0kk5few.aspx[/url]

Member Avatar for gerard4143
0
241
Member Avatar for ben1996123
Member Avatar for hsiaoyk901201
Member Avatar for Anirudh Rb
0
203
Member Avatar for cdn88

How and what are you calling Initialize (List *L) with. Note: You have this [code] L->items[i].name[MAXNAMESIZE - 1] = '\0'; [/code] Shouldn't it be [code] L->items[i].name[strlen(initialize)] = '\0'; [/code] ...After checking the docs I found strncpy pads the destination with '\0' so my point is null void.

Member Avatar for gerard4143
0
1K
Member Avatar for hsiaoyk901201

Your not passing the rent array to calculateRental...Also the first array element starts at zero not 1.

Member Avatar for hsiaoyk901201
0
147
Member Avatar for cdn88

I can't believe you compiler didn't warn you about this line.. [code] char test = "I like you"; [/code] Is this what your trying to do? [code] #include <stdio.h> #define ARR_SIZE 3 struct mys { char * my_arr[ARR_SIZE]; }; int main() { size_t i = 0; struct mys thes; char …

Member Avatar for cdn88
0
78
Member Avatar for RideFire

I would check what you calling the function name in your asm file. Your calling it _addus in the asm file and calling it addus in your main executable. The linker won't be able to resolve the names if they don't match.

Member Avatar for RideFire
0
138
Member Avatar for sunny124
Member Avatar for Zssffssz

[QUOTE=Zssffssz;1654862] PS How would I setup virtual memory in linux? Muffins[/QUOTE] Your in luck, Linux already comes with virtual memory set up.

Member Avatar for Moschops
0
173
Member Avatar for Zssffssz

Sounds like your trying to inject a piece of code somewhere. I don't think the forum encourages hacking practices.

Member Avatar for pseudorandom21
0
116
Member Avatar for NoUserNameHere

It means the function returns a integer reference for a return value. In your example prototype the function probably returns a reference to either a or b.

Member Avatar for mike_2000_17
0
109
Member Avatar for Zeref

Try running this code [code] #include <stdio.h> int main() { char aChar; printf("Please enter a character: "); scanf("%c",&aChar); while (aChar!='x') { printf("The Letter is %c or the integer is->%d\n", aChar, aChar); printf("Please Enter another character: "); scanf("%c", &aChar); } return 0; } [/code] Can you figure out what's going on? …

Member Avatar for Narue
0
215
Member Avatar for Tom_Weston

Line 12. Why are you doing this [code] cin >> calc >> end; [/code] Why >> end; Is this what your trying to accomplish? [code] #include <iostream> #include <string> #include <cstdlib> using namespace std; int main () { string calc; cin >> calc; if(calc == "calc") { system("calc"); } else …

Member Avatar for Tom_Weston
0
86
Member Avatar for Jsplinter

Class C is derived from class A, so creating an object of type C will automatically create an internal object of A. Object of type C contains an object of type A

Member Avatar for gerard4143
0
154

The End.