565 Posted Topics
Re: If you have any problems please post your questions. If you just want to contribute to DaniWeb with Sample codes, please post your code in a Code Snippet thread format. | |
Re: Here's a small Linq example: public static IEnumerable<string[]> Read(string path) { return from line in File.ReadLines(path) select line.Split(new [] {','}); } | |
Re: Search for this line when you edit your profile: Disable Ads? (Please consider a small [donation](http://www.daniweb.com/home/donate) if you disable ads). If you do check that box, make sure you check that donation link too. | |
Re: Here, take a look at this simple example, maybe it will help you understand how smart pointers can work: #include <iostream> #include <vector> #include <memory> using namespace std; #define SIZE 10 class Test { int* nr, curElem; public: Test() { cout<<"Object created\n"; nr = new int [SIZE]; curElem = 0; … | |
Re: Our member rules (on which you agreed upon registration) state this: *Do provide evidence of having done some work yourself if posting questions from school or work assignments.* We won't do your homework. Provide us with an actual problem over your code, and we might be able to help you. … | |
Re: As of a quick search on Daniweb I got this: [Click Here](http://www.daniweb.com/software-development/cpp/threads/67312/connecting-c-to-ms-access) which contains other links to this: [Linking MS Acess to C++](http://reydacoco.blogspot.ro/2011/10/linking-to-ms-access-data-source-using.html) [Developing Access Solutions to native C/C++ from MSDN](http://msdn.microsoft.com/en-us/library/cc811599.aspx) | |
Re: **NOTE:** this should be in the C++ forum thread. You need after each input operation to increase the size of the array. Your constructor definition is good, initializing the data, but you must have another function, let's call it `extendArray()` which increases your array size. For example: void extendArray(){ string … | |
Re: Just logged in. This new layout... totally blew my eyes off. Will take some time to adjust, but I see you put a lot of effort in it. I hope others appreciate it. :) ![]() | |
Re: Daniweb rules state this: **Do** provide evidence of having done some work yourself if posting questions from school or work assignments. Show us what you have so far. | |
Re: Static arrays are allocated on the stack and they have fixed sized, e.g. their size cannot be changed, either shortened or expanded. Dynamic arrays are allocated on the heap. You set their size and than even change it, making them "dynamic". In order to use these kinds of arrays you'll … | |
Re: I love how Dani was giggling almost all the interview. Immediately thought of this, I don't know why:  | |
Re: Well it depends. Where I work, Daniweb is kinda slow, but when I go home (which is near the city, ~15 km away), Daniweb is ultra fast... So depends on the ISP I guess. | |
Re: This is a video-driver-related problem. Check for updates on your video driver, see if anything changes. Google the error message: it will yield a lot of good links, such as this one: [Click Here](http://www.tomshardware.co.uk/forum/32085-63-display-driver-stopped-responding-successfully-recovered) | |
![]() | Re: First of all, it's int main() not void main() 2nd, line 22 sum=sum+(rem*rem*rem); should be sum=sum+pow(rem, numberOfDigits); How to get that `numberOfDigits`? Easy, apply `log10` over it: #include <math.h> #include <stdio.h> int main(){ //don't forget this!!! //code goes here //get your range for int len = (int)log10(num)+1; //get the number … ![]() |
![]() | Re: Search the website first, then post your question: [Click Here](http://www.daniweb.com/software-development/cpp/threads/455587/loops#post1979476) |
Re: 1. If you think that the problem at hand is not that hard, you can only sketch it and start writing code (for larger projects a deeper analysis is required). 2. Since you have to compute the carbon footprint of each of those objects, and you have the formulas, I'm … | |
Re: > I m new in programming languge and using turbo c . Get a moder C++ compiler first. >If u kindly give me the above said code, i will be remain thankful to you. Our member rules state this: **Do provide evidence of having done some work yourself if posting … | |
Re: Need more info and the code that you think has to do that... See if you assigned to your menu item the jpopmenu object. | |
Re: 1st, it's `int main()` and not `void main()` 2nd, You were actually doing a pointer aritmetic by this line: xx+= x + ", "; In your case, `", "` is a pointer to a sequence of characters. When you add an integer to that sequence, you are using pointer arithmetic. … | |
Re: Still, you could've formatted the code a bit. **nullptr**'s example points out very well the use of a default constructor. For multiple elements to be initialized, you could go the plain old fashion way of: class Foo{ int a, b, c, d; float e, f, g, h; public: Foo() { … | |
Re: Here's a small example. You can use the `getButton()` function from `MouseEvent`. final JLabel lblRightClickMe = new JLabel("Right click me"); //create a label lblRightClickMe.setBounds(152, 119, 94, 14); final JPopupMenu jpm = new JPopupMenu("Hello"); //create a JPopupMenu jpm.add("Right");jpm.add("Clicked");jpm.add("On"); //add some elements jpm.add("This");jpm.add("Label"); lblRightClickMe.setComponentPopupMenu(jpm); //set jpm as this label's popup menu lblRightClickMe.addMouseListener(new … | |
Re: For a better understanding of this output, I suggest this code to run in the `main()` function: int main() { Base obj; cout<<" 1st - initialization.\n"; int b = obj+6; cout<<" 2nd - get the int via the int() conversion operator\n"; obj = b; cout<<" 3rd - create a new … | |
Re: Try using a csv file [Click Here](http://viralpatel.net/blogs/java-read-write-csv-file/). | |
Re: It's kinda hard for us to figure out your problems since you didn't share them with us. | |
Re: Wrong thread. Post it here [Click Here](http://www.daniweb.com/software-development/python/114). ![]() | |
Re: **Abhinisha** if you have a specific question please start your own thread. Our member rules state this: *Do not hijack old forum threads by posting a new question as a reply to an old one*. This thread is 9 years old. I doubt they're still looking for answers. | |
Re: Maybe this link will share some light over this situation: [Click Here](http://tartarus.org/martin/PorterStemmer/)(never heard of it too). | |
Re: Usually Java has some tutorials on this over their website: [Click Here](http://docs.oracle.com/javase/tutorial/essential/io/buffers.html) Full tutorial: [Click Here](http://docs.oracle.com/javase/tutorial/essential/io/index.html) | |
Re: Your problem lies in line 17: name = ""; Your `name` attribute is initialized to a read only memory having `name` to point to that memory location, but any writing is illigal, thus your error. If you would initialize `name` as this: name = new char[200]; you would allocate memory … |
The End.