2,839 Posted Topics
Re: "first" is declared as a std::string, so if you want to use the comparison-operator, you should use double quotes, not single. Single quotes are [B]only[/B] for one character. so change: [code] if (first == 'F' || first == 'f') { one = "Nominally"; four = "nominal"; } else if (first … | |
Re: Post your new code and one sample input (a productNumber) | |
![]() | Re: The easiest way is to load it in a stringstream first, so you can use al your stream-functions. untested example: [code] std::stringstream a_stream; a_stream << std::setiosflags ( std::ios_base::right ) << std::setw ( 20 ) << "---------025125222" << std::endl; std::string the_string = a_stream.str(); std::cout << the_string; [/code] ![]() |
Re: [URL="http://www.google.com/cse?cx=013269018370076798483:gg7jrrhpsy4&cof=FORID:1&q=mingw+download&sa=Search"]click[/URL] | |
The icon "new" in trending doesn't work. The icon also doesn't work when a thread is moved from 1 forum to another. | |
See this post for [URL="http://www.daniweb.com/forums/thread289107.html"]example[/URL] or: testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest | |
Re: [B]>>I'm 100% sure all my variables are initialized (because of the fact I get no errors)[/B] There's a difference between declaring them and initializing them: declared, but not initialized will not give a compiler error, but will still cause problem [code] int a; cout << a; // <-- Uh oh, … | |
Re: Or something a bit more easy: [code] #include <iostream> #include <string> #include <vector> #include <sstream> int main() { std::stringstream s_str("@This@Is@My@String@"); std::vector<std::string> words; std::string word = ""; while (std::getline(s_str, word, '@')) words.push_back(word); for (size_t s = 0; s != words.size(); ++s) std::cout << words.at(s) << '\n'; }[/code] [edit] cross-post with Iamtwee.. … ![]() | |
Re: Check the [URL="http://www.cs.tut.fi/~jkorpela/chars/c0.html"]ascii code[/URL] | |
Re: First of all: Why? This sounds like you're making somesort of malware/spyware and that's against the rules. [B]>>i don't know how do c++ know that the internet is on[/B] :?: | |
Re: [B]>>They always appear right below the list of sticky "read me" threads (or at the very top if there are no sticky threads in the forum) and again at the very bottom of the listing[/B] I've never seen them until today. Later-- ![]() | |
Re: [quote] [B]Where?[/B] Shhh... It's a secret! It will take place at a bar/restaurant near the Internet Week headquarters in Manhattan. [/quote] That's just a few thousand miles away! :D Anyway: Don't forget to post pics afterwards! | |
Re: You should have a look at [URL="http://openlayers.org/"]openlayers [/URL] | |
Re: >>did someone see me??? Me. | |
Re: The information is one post above yours regards Niek | |
Re: [QUOTE=daviddoria;]This probably belongs in the 'C' forum as it is not C++. [/QUOTE] I agree: moved. @OP: I suggest you post the code that you're currently using. How are we supposed to give feedback on code we can't see? You wouldn't be tricking us in giving you free homework 'ey? … | |
Re: [B]>> Sorry I think I posted it on the Wrong Forum, Please Delete this Post.[/B] It'll get moved in a short while. Be patient :) | |
Re: [QUOTE=vb5prgrmr]I have reported your post and asked for you post to be put into a thread of its own.[/QUOTE] Done. | |
Re: [B]>> is there any way to run two functions at the same time [/B] Google for multithreading. Boost has a [URL="http://www.boost.org/doc/libs/1_43_0/doc/html/thread.html"]thread class[/URL] build-in which is quite handy. | |
Re: [QUOTE=codedhands;991613]21 views and no asnswer?[/QUOTE] Perhaps that's because you posted in the C++ forum, but your question has nothing to do with C++? [QUOTE=codedhands;991613] Please i need you to help me go through it,i need a basic explanation(examples will be nice) with less mathematical symbols. [/quote] Why do you think … | |
Re: Look at the post above your own: [QUOTE=williamhemswort;638430]Look how old the thread is.. Read the rules!![/QUOTE] This still applies. The thread didn't get any younger... So to get your thread answered - start a new thread - post your code in the new thread (using code-tags) - ask a clear … | |
Re: To be honest, it's looks like you have no clue what you're doing. You've pasted some mangled Java-code in a cpp file and hope it works. Do you know the difference between Java and C++ ? Did you copy-paste this code from somewhere on the web? | |
Re: [B]>>and learn to post in the right forum [/B] What's wrong with the game-dev forum if he's developing games? | |
![]() | Re: [QUOTE=Dumbledor;1222727]4 students just copied this code and lost all their points for the assignment.[/QUOTE] Excellent. More teachers should use google to find ctrl-v-code. |
Re: Did you look at iamthwee's code? He said: [I]>>After changing a few bits and bobs and [B]not calling the windMouse function[/B] I can get it so it doesn't crash[/I] ![]() | |
![]() | Re: Thank you for the effort, but I always use the inbuild beautifier in VS. I like the idea of removing comments however. ![]() |
Re: You don't. You build it with components, like motors, sensors, a frame. Since you obviously a newbie in this, I suggest you start [URL="http://www.robotroom.com/index.html"]here[/URL]. | |
Re: From [URL="http://en.wikipedia.org/wiki/Gabor_filter"]wikipedia [/URL]perhaps? Next time you ask a question about a code, you should probably mention [I]what[/I] is wrong with it. - Does it compile? If not: post error messages - Does it produce expected output? If no: what is the output you were expecting, and what is your current … | |
Re: >> My question is: what language(s) would be best for this If you're going to use a touchscreen for GUI, you require a rather 'advanced' embedded device. Most of the devices in this category will happily run Linux, WinCE or ... So you have a wide range of languages to … | |
Re: [QUOTE=GrimJack]You shoulda linked to it - I could not find it.[/QUOTE] [URL="http://www.daniweb.com/forums/thread282976.html"]link[/URL] | |
If you select 'upvoted posts' and try to go to page 2, you'll get a 404. | |
Re: Apparently Dani agreed with the OP: [URL="http://www.daniweb.com/forums/forum181.html"]Mobile Dev forum[/URL] Have fun. | |
Re: > at least Im certainly not seeing any increase in the programming forums. I don't really visit *all* the program-forums on an hourly basis, but I think C/C++ is indeed getting a bit more visitors actually. And now for the amazing part: I see a significant increase on 1-time-posters who … | |
Re: >> Btw, do I close my own thread, and if so, how? Nope, threads stay open at Daniweb. If your question got solved, you can mark it solved by clicking the link "Mark this Thread as Solved". | |
Re: It was the op's fault. He did this: [noparse] [TEX][ICODE][CODE] blahblah...horrible code. [/CODE][/ICODE][/TEX] [/noparse] So the TEX-engine tried to parse it, but failed as you can imagine :) btw: I've edited the thread you were referring to | |
Re: Something like [URL="http://www.google.com/#hl=en&source=hp&q=voice+recognition+sdk&aq=f&aqi=g1g-m4&aql=&oq=&gs_rfai=&fp=f2c2514842c84d15"]this [/URL]perhaps? | |
Re: [QUOTE=jonsca] Not a bad response. Judges?[/QUOTE] Sounds like a winner. | |
Re: To be honest, I disagree. I looks a lot cleaner this way. Although I have to say that this will probably take a few weeks to get used to.. But overall it looks nice. I see that we no longer have reputation? And tags? [edit4] scratch that, I see how … | |
Re: >> Last Post Don't start threads with these kinds of titles again please. I thought you were leaving because of all the purple ;) | |
Re: As in normal colored text? No code-detecting or whatever? [code] #include <iostream> #include <windows.h> int main() { HANDLE hConsole = GetStdHandle (STD_OUTPUT_HANDLE); SetConsoleTextAttribute (hConsole, FOREGROUND_BLUE); std::cout << "Something like this perhaps?\n"; }[/code] (only for windows of-course) | |
Re: [QUOTE=Sodabread;1204855] Is this a common occurrence around DW or am I just lucky? [/QUOTE] Spam I get about one each month. Users asking for help about once every two days. | |
Re: [URL="http://en.wikipedia.org/wiki/Cow_tipping"]Cow tipping[/URL]. Which reminded me of this : [attach]14135[/attach] (moooohhh!) Which made me laugh :) | |
In code-snippets avatars and "badges" aren't showing. Not a biggy, but thought I should let you know. | |
Re: >> need a code somewhat like this Too bad for you. Closed | |
Re: Agreed. No-ones life is complete without having seen Avatar in 3D. Seriously, go now! | |
Re: [QUOTE=Ene Uran;1216746]Well, better late than ever! Congratulations and good luck [B]root[/B][/QUOTE] Not to be a dick or anything, but you [I]do[/I] realize that you're replying to a thread that has been dead for [B]7[/B] (!) years right? | |
Re: I don't think that's possible (I'm sure it's not posssible in C++ so...). But why not use classses? Or what are you trying to do? |
The End.