519 Posted Topics

Member Avatar for numbawang

[url]http://www.google.com/search?hl=&q=gaussian+elimination+c%2B%2B&sourceid=navclient-ff&rlz=1B3GGGL_enIN258IN259&ie=UTF-8&aq=7&oq=gaussian+elimination+[/url] Maybe you should have a look here as well

Member Avatar for daviddoria
-1
124
Member Avatar for Piyush07

What do you mean by the prototype of error. Can you explain a little bit more, what is that you want.

Member Avatar for Fbody
-1
39
Member Avatar for adxer

Works fine for me. This is the output that I got when I ran the code [CODE]please enter value x,y for top left10 please enter value x,y for bottom right20 please enter value x,y for point30 point 30, is outside rectangleplease enter value x,y for top left15 please enter value …

Member Avatar for dfetter88
0
319
Member Avatar for javedkhan0258

In the first look there seems to be a problem in the way you create the linked list. According to what I think, you dont have a head pointer. What is the name of the pointer which points to the head of the linked list ?

Member Avatar for abhimanipal
0
104
Member Avatar for spartan118

Check the parameters that you are passing when you call the function damagecalculate and then check how you have defined the function PS: Do you actually need to pass so many parameters into a function. You are bound to make a mistake. Cant you roll them up into a struct …

Member Avatar for abhimanipal
0
102
Member Avatar for Banfa

[QUOTE]Looking mathematically, this approach is clearly wrong, cause factorization involves decomposition of number into PRIMES and not into other numbers (such as 9 etc.). So checking division with non-prime mathematically doesn't make any sense. [url]http://mathworld.wolfram.com/PrimeFactorization.html[/url] [/QUOTE] Mathematically also this approach is not wrong. As I explained in the above post …

Member Avatar for 0x69
3
308
Member Avatar for jwelsh

What exactly do you mean by hashtable of pairs. Based on what I understood from your description, you need a generic implementation of maps. As I see that you have made efforts (also it may be the case that I have misunderstood your problem and the code is completely useless …

Member Avatar for jwelsh
0
866
Member Avatar for mr.confused!

If your code is huge then break it into functions If you have to pass some parameters to the functions, passing them by pointers has an advantage that you can manipulate the value of the string inside the function Does this answer your question ?If not phrase it differently. As …

Member Avatar for jephthah
0
146
Member Avatar for boiishuvo

When you declare an array, you need to give the size of the array [CODE]int main() { int arr[]; cin.get(); return 0; } [/CODE] Also how is the array getting its values. In post 1 the code you posted, the buy and sell bids were stored in objects in the …

Member Avatar for abhimanipal
0
110
Member Avatar for Violet_82

When the value of the variable letter is 65, the alphabet A is displayed. When the value is 90 the variable Z is displayed. At this time the value of counter is 26. The for the values 91-96 there is no display. Then the value of letter becomes 97. Counter …

Member Avatar for Violet_82
0
162
Member Avatar for skypower

[QUOTE=skypower;1220959]Hello, I am having some strings grammar problems. Also by the way, [CODE] data = fopen("C:\\Program Files (x86)\\CodeBlocks\\mydata.dat","rb"); if (data == NULL)[/CODE] the data isn't getting NULL, even the file doesn't exist![/QUOTE] Try to read the contents of the file. If you are able to read and print the contents …

Member Avatar for eager
0
193
Member Avatar for prototyppe

Can you post how you have declared matchedAsk and ask vectors ? Also towards the ending in the for[line 48] loop, I notice that you are not changing the value of the index y. Is that what you want ?

Member Avatar for prototyppe
0
134
Member Avatar for 3cats

In the main function when you call getData, the array m_t is not declared anywhere .Either make this array global or pass a pointer (reference to this array) to the getData function

Member Avatar for jonsca
0
194
Member Avatar for jelinky

I think the problem is in the main function .... I notice from the code that you have posted in post 1 you are calling search twice... Can you post an updated version of your main function.

Member Avatar for jelinky
0
124
Member Avatar for barevhayerable

[QUOTE=barevhayerable;1220629][CODE] //put meshok1 to gumareli_1, meshok2 to gumareli_2 and then plus it //using atoi functions ok? //could you? //don't forget to type discription plz //and if you want add me to google friend(zz follow) list "Mikael Arakelyan" }[/CODE][/QUOTE] No..... But tell you what here is an example of how to …

Member Avatar for abhimanipal
0
385
Member Avatar for obeem

Dude why have you used integer(double) arrays instead of integers and doubles ? Also make a display function in your class. It will help you a lot to debug

Member Avatar for abhimanipal
0
268
Member Avatar for xofth

Is this code a function in some program ? Otherwise you really dont need to stract the strings. Just print them in the correct order

Member Avatar for abhimanipal
0
109
Member Avatar for dinesh.isuranga
Member Avatar for abhimanipal
0
82
Member Avatar for purvi12345
Member Avatar for jeeter19

Why are you just passing a void pointer. Why cant you pass the file pointers to the filecopy function ?

Member Avatar for abhimanipal
0
111
Member Avatar for ajithasati

Adding further to the what UncleLeroy has stated If you have some code of this sort [CODE]char* str= "ABCDEF"; str[1]='A'; [/CODE] You will get a seg fault. I THINK that is because the string "ABCDEF" is stored in the code section of the process and any attempt to modify it …

Member Avatar for abhimanipal
0
71
Member Avatar for leway
Member Avatar for habib_parisa

This is what I think When you called malloc, you called it individually on each element in the array of pointers. So extending the same logic, when you call free, you have to call it on each element in the array. Corrections to this post are invited

Member Avatar for jephthah
0
6K
Member Avatar for tamarad
Member Avatar for Eternal49

Maybe something of this sort [CODE]int i=0; long int bin=0; while(i<8) { bin= bin+ rem[i]*(pow(10,i)); i++; }[/CODE]

Member Avatar for abhimanipal
0
197
Member Avatar for NathanOliver

You are on the right track but your implementation can be made more efficient. I have written down some sample code for you. So if you want to find the prime factorization of 12 the call to the function will be primeFactors(12,v1,2); [CODE]void primeFactors(int num,vector<int>& v1,int start) { int i=0; …

Member Avatar for NathanOliver
0
134
Member Avatar for sourabhtripathi

I dont think you code is logically correct. If I give the input as 4, the successive values of rem will be 0,0,1. But the final value in ans will just 1. So in the 2 while loop you will just get 1 as the answer. The usual method used …

Member Avatar for abhimanipal
0
159
Member Avatar for manish.ranjan
Member Avatar for manish.ranjan
0
76
Member Avatar for rkp728

SpinLock- If a process cant get a particular resource it keeps continuously checking to see when the resource becomes available. Context switch does not take place. This would be useful in cases where context switch takes much more time than the actual computation done by the process Mutexes- If a …

Member Avatar for abhimanipal
0
83
Member Avatar for rai32

The reason why you are getting endless loops is because when you re arrange the pointers, the list becomes circular( Work out your code on a piece of paper if you dont believe me) . Another solution could be to delete the node(totally disconnect it from the list) and then …

Member Avatar for abhimanipal
0
123
Member Avatar for boiishuvo

Also to run the executable you have to type ./a.out google for the functions fread, fwrite... This will help you get started

Member Avatar for abhimanipal
0
2K
Member Avatar for choragos

@choragos ... Check out the strtok function.... I think that might solve your problem....

Member Avatar for choragos
0
349
Member Avatar for ohh
Member Avatar for mitrmkar
0
184
Member Avatar for wxy_3

What do you mean when you say "denote addition" ? Check out strtok(), atoi() you may find it useful to extract numbers from the string

Member Avatar for sourabhtripathi
0
71
Member Avatar for Xufyan

[QUOTE=Xufyan;1209482]ok ! suppose i entered values for num[i] : 2, 5 , 7, 9, 3 the program first check every value with the value inside the loop j ? which means it will check with the next value of num[i] ? for example, here first value for num[i] is 2 …

Member Avatar for sourabhtripathi
0
99
Member Avatar for chialoo
Member Avatar for LeoC++

You could save the code to a different file and try running it there ....

Member Avatar for LeoC++
0
123
Member Avatar for lross1309
Member Avatar for casjackkwok2001

Do you mean access the data members of the class policeOfficer ? You have to use the get/set methods defined in the class policeOfficer In the main function you have used the get/ set methods in for the class Parked Car.... Use that for example

Member Avatar for Fbody
0
123
Member Avatar for mariosbikos

When you are using printf statements in the sin2() function, you print one value, using the %c specifier and the other using the %d specifier .... Is there any reason for that ? Also I am not able to clearly understand what you are trying to do. Is this the …

Member Avatar for mariosbikos
0
111
Member Avatar for dylan9

[QUOTE]I have file(.txt) that the program reads on and it outputs the words aphabetically and if the word has been seen, it adds a count to it[/QUOTE] This is being done with which data structure ? If you want to use the binary tree for counting the frequency of the …

Member Avatar for abhimanipal
0
2K
Member Avatar for antra1234

[QUOTE=antra1234;1208156]char *default message[]="hghgghjgh" char *message=defaultmessage tis line showing error as 'initializing':cannot convert from 'const char[ 9] to 'char *[]' can u help me....?[/QUOTE] Start your own thread for your problems

Member Avatar for abhimanipal
0
117
Member Avatar for bobyx

Dude there are many mistakes in your program [QUOTE=bobyx;1209900]Hi.I write a program in C for my microcontroller(PIC 18F452) but faced to a problem that related only to C language and that is; as you can see in my Main program and the two Functions I want to pass an array …

Member Avatar for Iam3R
0
192
Member Avatar for stevendavis84

If you want to pass the shift information you want to make use of the object of the class ProductionWorker. You are trying to pass shift information in the object of class Employee

Member Avatar for abhimanipal
0
417
Member Avatar for koupas
Member Avatar for abhimanipal
0
7K
Member Avatar for kavi_90

I dont think so ... Each file will get its own copy of the variables defined in the header file

Member Avatar for abhimanipal
0
215
Member Avatar for abhimanipal

Hello people I have a small doubt in operator overloading I am trying to overload the assignment operator. Here is my code for that [CODE] class rational { int x; int y; public: //All the constructos rational operator= (rational num) { // Why do we need to return a reference …

Member Avatar for Ancient Dragon
0
159
Member Avatar for fregley

If you want to do many things at the same time ... I would suggest you get a grip on Multi threading as well ... Might be useful

Member Avatar for fregley
0
151
Member Avatar for tquiva

To access the values of an array using a pointer is quite easy [CODE] int arr[]={1,2,3,4}; int* p= arr; int i=0; for(i=0;i<4;i++) printf("%d %d\n",*(p+i), p[i]); // To ways to do the same thing [/CODE] When p[i] is actually a short form for *(p+i). Now you can use this example in …

Member Avatar for Adak
0
163
Member Avatar for lionaneesh

The End.