1,177 Posted Topics

Member Avatar for ashima 2

Or you should have just learned c or c++ in your course! As nbaztec recommended, if you have specific questions we'll be glad to help if you demonstrate that you have thought about/tried them yourself first.

Member Avatar for dhruv_arora
0
134
Member Avatar for fernandofranca

That is because you have not [icode]#include <cstdio>[/icode] Also, you should pretty much never include a .cpp file.

Member Avatar for nbaztec
0
203
Member Avatar for web3

I use linux and QT. It is annoying to figure out for the first time, but it is really nice once you get used to it. Dave

Member Avatar for Stefano Mtangoo
0
213
Member Avatar for aliyami90

You say "one last question" but I didn't see any questions before that? Also, what do you mean by choice 3 and 4? Please break you question into small parts and give them a shot. If you have a problem with a particular piece of code (maybe < 10 lines …

Member Avatar for NathanOliver
0
829
Member Avatar for vbx_wx

See also: [url]http://www.daniweb.com/forums/thread117408.html[/url] And again: This is another one of those "common" questions that I am recommending cataloging: [url]http://daniweb.uservoice.com/forums/62155-general/suggestions/830529-create-a-wiki-to-catalog-answers-and-examples-?ref=title[/url] Please vote for it! Dave

Member Avatar for daviddoria
0
134
Member Avatar for Grusky

Hi Grusky, welcome to DaniWeb! First, maybe studying the name will be a good place to start. "Linked list" indicates that there are some kind of pieces (elements in the list) that are "linked" together. There is a pretty good description here: [url]http://en.wikipedia.org/wiki/Linked_list[/url]. I'm not an expert, but without a …

Member Avatar for daviddoria
0
137
Member Avatar for dchunt

This looks like a terrible idea! :) [icode]char ss[32556];[/icode] Why not use std::string instead? Dave

Member Avatar for nbaztec
0
106
Member Avatar for daviddoria

Any Drupal users out there?? I have created several articles ("Article1", "Article2", etc) and I want to display them on the page called "Projects". Someone told me to look at "views". I went to "structure->views" and there are a bunch of options such as "archive", "backlinks", "comments", etc. but I …

0
49
Member Avatar for charlie4oct
Member Avatar for nbaztec
0
80
Member Avatar for Roelof Wobben

I don't understand what you mean by the "vector must be 10", "the vector must be 14", etc. Can you clarify? Dave

Member Avatar for Roelof Wobben
0
98
Member Avatar for KAY111

Welcome to DaniWeb! To make your time here as successful as possible, allow me to recommend a few things: 1) Remember to close your code tag :) 2) Use a descriptive title (i.e. Not "A problem", but rather "A short summary of the specific problem". 3) Try to post < …

Member Avatar for arkoenig
0
116
Member Avatar for akssps011

First, I'm not sure if you actually copied and pasted, but in your A class, [icode] public; [/icode] should be [icode]public:[/icode]. Second, you need semicolons after the closing brace of all of the class definitions. The main problem is that you are defining m_b in the constructor of A (a …

Member Avatar for akssps011
0
167
Member Avatar for hisugan

hisugan - Welcome to DaniWeb! Here is a very good collection of demonstrations of many concepts in c++: [url]http://www.java2s.com/Code/Cpp/CatalogCpp.htm[/url] Ketsuekiame - Let's all play nice! He is new here, he'll get the hang of it :)

Member Avatar for Ketsuekiame
0
83
Member Avatar for Schoorsteen

I'm sure this is not helpful, but as a data point for you this runs fine for me. [code] #include <iostream> #include <cstdio> #include <cstdlib> int main() { system("/usr/bin/firefox"); return 0; } [/code] Dave

Member Avatar for daviddoria
0
580
Member Avatar for Grep
Member Avatar for Grep
0
254
Member Avatar for ShortYute

I would use a std::vector<std::string> to get an array of strings to the constructor. Any time I see **, I think "there is definitely a better way to do this" :)

Member Avatar for ShortYute
0
124
Member Avatar for Duki

I agree that it should be at the top. It took me a minute to find it after the change. Dave

Member Avatar for happygeek
2
214
Member Avatar for achieve_goals

Unfortunately I don't have answer to your question, but I have two suggestions 1) make a much more descriptive title - this will entice people to investigate your problem 2) Please use code tags. This makes the code that you post much more readable. Dave

Member Avatar for daviddoria
0
72
Member Avatar for minihannah

You absolutely cannot read jpg files with iostream! jpeg is a lossy format which means you need the inverse of the jpeg compression algorithm in order to read it! BMP may be possible, but you're crazy to read it yourself! My suggestion would be to use a library that has …

Member Avatar for minihannah
0
1K
Member Avatar for The_Prince

You could simply take the input as a std::string and then use yourString.size(). If there were decimals, you could check each character to see if it is a number using something like this: [url]http://www.java2s.com/Tutorial/Cpp/0040__Data-Types/Usingfunctionsisdigit.htm[/url] [code] int digitCounter = 0; for(unsigned int i = 0; i < yourString.size(); i++) { if(isdigit(yourString[i])) …

Member Avatar for NathanOliver
0
166
Member Avatar for dansnyderECE

You need the .c_str() function. If you have a [code] std::string MyString; [/code] and you want to pass it to something that accepts a char*, pass it MyString.c_str() Dave

Member Avatar for dansnyderECE
0
103
Member Avatar for j-green.10

You probably want a 'do while' loop here. The condition of the loop should be if the input is not 0. The content of the loop should be to get the input and get it into a form that it can be compared with 0. Give it a shot and …

Member Avatar for jerry emmy
0
87
Member Avatar for ibrahim72ro

Welcome to DaniWeb! I have a few tips to get you started. 1) While we understand that English is not everyone's first language, you must still use proper English words. For example "plz" and "thx" are not proper words. 2) You must use code tags when posting code. It makes …

Member Avatar for daviddoria
0
180
Member Avatar for dansnyderECE

Have you looked into using ifstream? This is the "new way" to read files where scanf is the "old way".

Member Avatar for dansnyderECE
0
96
Member Avatar for btbam006

Glad to hear that you like Daniweb! It does sound like quite a task for a 2 week project. There is a game development forum here that may be able to help you out: [url]http://www.daniweb.com/forums/forum71.html[/url] It seems to me like the key will be to identify the intersection of the …

Member Avatar for packetpirate
0
138
Member Avatar for dansnyderECE

You may also try posting this in the C forum if you don't have any luck here.

Member Avatar for daviddoria
0
208
Member Avatar for dansnyderECE

Sounds like you want to concatenate vectors? You can do [code] vector1.insert( vector1.end(), vector2.begin(), vector2.end() ); [/code] to append vector2 to the end of vector1. An equivalent statement is [code] std::copy(source.begin(), source.end(), std::back_inserter(destination)); [/code] Don't forget to vote for answer cataloging so this can be added to a solution database …

Member Avatar for daviddoria
0
103
Member Avatar for n30h4x

You can construct the ssh string in your code (e.g. "scp file server") and then run it using the system() command. Did I understand your question correctly? Dave

Member Avatar for n30h4x
0
157
Member Avatar for nwhitfield
Re: help

Welcome to Daniweb! First, please use descriptive titles. This will help you get answers faster as people will be intrigued by your title! To answer your question, my suggestion would be not to use c++! I think you will have much better luck posting this question in the game development …

Member Avatar for nwhitfield
0
79
Member Avatar for daviddoria

I've seen a couple of "short lists" posted - are you guys aware of [url]http://uservoice.com/[/url] ? Here is a live site if you want to poke around: [url]http://paraview.uservoice.com/[/url] It is a really nice way to (openly) keep a list like this and collect in an extremely organized fashion users wants …

Member Avatar for daviddoria
2
288
Member Avatar for ronnieaka

What you have described is called "rejection sampling". That sounds like a reasonable way to go about this to me. If you use std::vector to to store the elements you can then use find() from the stl to do the search. It shouldn't be that bad for something as small …

Member Avatar for gusano79
0
732
Member Avatar for daviddoria

I posted this a while ago: [url]http://www.daniweb.com/forums/thread287028.html[/url] Since there were not many replies, I'm assuming something like this doesn't exist? Maybe DaniWeb would like to start one? Just a thought. Dave

0
102
Member Avatar for epicasian

You may want to ask here: [url]http://www.opengl.org/discussion_boards/[/url] or here: [url]http://www.gamedev.net/community/forums/forum.asp?forum_id=25[/url]

Member Avatar for epicasian
0
201
Member Avatar for nearest

Welcome to Daniweb! Although your question is written in c++, you may have better luck with this kind of thing in the Game Development forum: [url]http://www.daniweb.com/forums/forum71.html[/url] Also, be sure to use /code at the end of your code tags so they are applied! I'd also try to simplify your question …

Member Avatar for daviddoria
0
211
Member Avatar for haseeb1431

Welcome to Daniweb! To produce an executable, you need to "compile" or "build" the code. Also, you should use [icode]#include <iostream>[/icode] and [icode]std::cout << "abc";[/icode] instead of [icode]#include <stdio.h>[/icode] and [icode] printf("abc");[/icode] Hope that helps, Dave

Member Avatar for haseeb1431
0
99
Member Avatar for catalyst491

I'm not exactly sure what is going on, but it looks like Form1 is in the PublishWizard namespace and you have not given a PublishWizard:: prefix or a "using namespace PublishWizard" when you try to reference Form1 in Utility.h Dave

Member Avatar for daviddoria
0
206
Member Avatar for daviddoria

Is the only way to get to the "advanced search" page by searching for a blank string? Should there be an "advanced search" link under the "Search" button? Dave

Member Avatar for happygeek
1
42
Member Avatar for gedaahmed
Re: sort

Welcome to Daniweb! Please show us your attempts - we'll be much more inclined to help you fix something you already have instead of writing it for you from scratch :) Can you also clarify the problem? Do you have a list of names? Are they in a std::vector<std::string>? If …

Member Avatar for Fbody
0
73
Member Avatar for dinesh.isuranga

You could look into Boost Date/Time: [url]http://www.boost.org/doc/libs/1_43_0/doc/html/date_time.html[/url]

Member Avatar for daviddoria
0
90
Member Avatar for sasTReSS

You never tell it how big ClassFreq should be, then you start accessing elements! It looks like you should do [code] vector <int> ClassFreq(numberOfClass); [/code] but I'm still not exactly sure what you are trying to do, it seems like there may be a better way using stl functions. Dave

Member Avatar for sasTReSS
0
79
Member Avatar for WASDted

[QUOTE]If you are not already a fan on Facebook go here[/QUOTE] I believe they have changed the terminology from "fan" to "like"? I'm not sure what the verb form (similar to "become a fan") of "like" is? "Tell Facebook that you like Daniweb?" haha Dave

Member Avatar for daviddoria
0
379
Member Avatar for hypernova

An adjacency list should simply be a std::vector<std::pair>, right? [url]http://en.wikipedia.org/wiki/Adjacency_list[/url] You look like you have created more of a graph traversal structure here. Unless you are doing this simply as an exercise, there are some graph libraries out there already. I use vtkGraph (I put some examples here: [url]http://www.vtk.org/Wiki/VTK/Examples#Graphs[/url] It …

Member Avatar for daviddoria
0
141
Member Avatar for ctoshi

Welcome to Daniweb! First, in the future please use more descriptive titles. This will "help us help you". It will also get more people interested in your question as you can peak their interest with the title. What is QRNA? Please post the smallest compilable code that will produce this …

Member Avatar for daviddoria
0
61
Member Avatar for daviddoria

Yesterday I received a "Site Temporarily Unavailable" message on daniweb.com. The instructions asked to send an email to inform Dani of the problem. I bet that almost no one actually does this. Would it make sense to add a button that simply says "click here to report the problem" and …

Member Avatar for daviddoria
0
147
Member Avatar for Ryan61343

I would use std::stringstream to put the int into a stirng. Then the logic is much more straight forward to get each digit of the string. You can again use stringstream to get each one back to an int before adding them. iamthewee's option also works, but it could be …

Member Avatar for Ryan61343
0
77
Member Avatar for epicasian
Member Avatar for j-green.10

I'm assuming you mean you have created some kind of table in c++? I would write it out as a CSV (comma separated value) file and the import it into excel using the CSV reader. Dave

Member Avatar for iamthwee
0
79
Member Avatar for Wakesta

If you just want introductory information about c++ and some basic tutorials, I'm sure google has some :)

Member Avatar for ctaylo21
0
97
Member Avatar for nouah

Doesn't sound like you want help with pointers, but more you want us to do your homework!

Member Avatar for daviddoria
-3
71
Member Avatar for BLKelsey

[QUOTE]1. Why doesn't my 'char Menu::getSelection()' from my menu.cpp not display the cout stream? That's all I need it to do, for now.[/QUOTE] I'm assuming by "display the cout stream" you mean it doesn't write anything to the console? I think you may need to flush the buffer by doing …

Member Avatar for BLKelsey
0
77

The End.