General C++ Programming - May 2018 (Page 8)

by WildB
Need help with Array Based List, specifically the intersection of two array based list
 
My code so far: #include <iostream> #include <string> #include <vector> using namespace std; typedef int ItemType; class List2 { public: List2()...
[4 replies] Last: Thanks this help a lots. (by WildB)
Where can I find weird C syntax rules?
 
I will take an exam and my teacher asks weird C syntax rules. Like: <code> int q=5; for(q=-2;q=-5;q+=3) { //assignment in condition part?? pr...
[7 replies] Last: Sounds dreadful. I personally would very much dislike your teacher. ... (by Ganado)
by SPP
Does wcsdupa exist?
 
Google found web pages that say that strdupa exists but only in GNU C library, but I don't find wcsdupa anywhere. Does wcsdupa exist? strdupa invokes strlen t...
[5 replies] Last: ...or you could just write it for yourself, like these two projects di... (by Cubbi)
Print Map Elements
 
while (true) { if (infile) { infile >> ai. airportCode >> ai. city >> ai. phoneNum; while (! infile. eof () )...
[3 replies] Last: for (it = air.begin(); it != air.end(); ++it) { cout << "\nAirport ... (by Repeater)
Repetation structure
 
I need help in to make the following program can anyone help me. im new to c++ #include <iostream> using namespace std; int main() { int Limit=21; /* • Th...
[1 reply] : Please don't post duplicates. http://www.cplusplus.com/forum/beginner... (by kbw)
Anyone interested in checking my calcultor
 
It is an f(x) area under the curve calculator and I am receiving an error message about float f(x) before I return something such as return x^2; before ending t...
[1 reply] : ^ is the bitwise XOR operator. If you want to compute x 2 you can u... (by Peter87)
STD SET problem, will not let me print set
 
So I know when you want to print out a STD set of objects , you need an iterator and iterate through it. I have done that and dereferenced the iterator as well ...
[8 replies] Last: I'm stumped, my friendly. Hopefully someone else will be able to help.... (by tpb)
Binary checker (1,2)
 
Can someone please tell me whats wrong with my checker? I copied and pasted some parts of my code, where I use this checker but it seems that there is something...
[20 replies] Last: I am sorry, but did you even try inputting "1" only in my code and se... (by mbozzi)
by mc0134
if using namespace std is not recommended...
 
Hi, if using namespace std is not recommended, then why does Mr. Stroustrup himself have codes on his own site that have it? http://www.stroustrup.com/bs_faq2...
[2 replies] Last: Here are a few quotes from Bjarne's book The C++ Programming Language ... (by Peter87)
How to make an object move with in an intervals?
 
I created a moving car sample using graphics.h The car moved correctly but how can I stop it rather than disappearing at a point? Here is the source code:...
[3 replies] Last: you may want to post what you changed? (by jonnin)
Variable losing value
 
Hello, all! I have a problem where a std::string is being passed to multiple nested methods, and somewhere along the line, it goes from having a value to becom...
[14 replies] Last: That solved it! Thank you so much! (by lissalissa)
The difference between the programming language C# and C++
 
Firstly, with C #, only .NET applications can be created (actually C # is made for .NET), but with C ++, they can write both .NET managed and native application...
[3 replies] Last: ...This is a spam OP post... note that the OP didn't even pretend to a... (by Ganado)
How can I declare a istream_iterator on cin without putting the system in reading mode?
 
Hi, I have a simple code which is behaving strangely: istream_iterator<int> it{cin}; // meant to declare an iterator, not to start ...
[8 replies] Last: actually that "After it is constructed" wording is indeed controversia... (by Cubbi)
Need a lot of help with stack program
 
Hello guys, first of all, I'm sorry if my English is bad.. :D So, I'm going straight to the topic. I need some help with my programming homework. "Write a ...
[6 replies] Last: the easy way out is to use this opportunity to learn about <vector> wh... (by jonnin)
by yurmom
can anyone explain the output for line e:
 
int fun(int x, int &y) { if (x < 0) y = -x; if (x <= 0) return 0; return x % 10 + 2 * fun(x/100, y); } int main() { int c, x = 1, y = 5; if ((x % y) > (y ...
[8 replies] Last: Is the extra logging not enough? It tells you exactly what values are ... (by Repeater)
Errors with data structures
 
Getting two errors. The first error is "error: use of undeclared identifier 'flights'. The second error is "error: use of invalid use of non-static data member ...
[2 replies] Last: Thanks Peter87. It works now! (by waranthem)
by urko18
How save servos position in a SD card (1,2)
 
Hi to all of you! I'm doing the programming of a robotic arm (maybe some of you knows me because it's not the first time I ask around here), and this time my...
[25 replies] Last: I understand what you want to tell me, but as I said I still have thin... (by urko18)
by tnrh1
Direct3d - Changing resolution ratio
 
Hello, I'm working on a pc game c++ source which is not written by me and I'm trying to display the game in different resolutions except 4:3. The code is imp...
[no replies]
by dorlow
How do I create a hello world c++ in Netbeans?
 
I'm running Netbeans on Linux Mint. I'm trying to figure out how to create a hello world in Netbeans. I went into Tools --> Plugins and enabled c\c++. I star...
[3 replies] Last: Hi dorlow, This is just a guess from googling, but have you read: htt... (by Ganado)
by Agrito
Passing 2d arrays to functions
 
hey guys i need some help plz tell me how do i pass 2d array as parament to a function with user defined dimentions .. #include<iostream> using namespace st...
[2 replies] Last: Thanks bro and ill be carefull next time i didnt knew since im new her... (by Agrito)
May 2018 Pages: 1... 67891011
  Archived months: [apr2018] [jun2018]

This is an archived page. To post a new message, go to the current page.