General C++ Programming - April 2013 (Page 51)

Am I using std:: correctly?
Hello. I usually use: 'using namespace std', however: today I tried not using the command, and ad...
[6 replies] Last: I usually recommend the std:: method. I recommend always keeping the u... (by jlb)
Iterator value problem
Hi, I am trying to compare value for iterator. Currently i manage to get the value of pdu.short_m...
[1 reply] : Strings require double quotes, single quotes are for single characters... (by LB)
help needed
hey , i am using Google performance tool kit to know the memory usage but on running PPROF following...
[1 reply] : Can't exec "objdump": No such file or directory at /usr/local/bin/ppr... (by kbw)
cpp without using main function
Hi guys, I want to have the same output, but without using the main function: #include <stdio...
[12 replies] Last: Thanks for your reply Mike. I'm using this code to replace a dot for... (by ajh32)
Zero and setprecision
I have a program that needs to output the input with a setprecision of 2 but when it outputs 0, it h...
[7 replies] Last: You are welcome :) (by Michaela Elise)
by Dineo
how do I Differentiate false statements in a function
I'm havin trouble outputing different false statements in a boolean function... I'm currently workin...
[6 replies] Last: Now that's another way of doing there really are different way... (by Dineo)
Making Pacman In C++
Hello guys, Over the past reasonable amount of practicing time and months, and a long period of prac...
[3 replies] Last: I don't know if it is possible to make a "console" pacman... mainly un... (by Nobun)
by kohlh
precompiled header files
I am not sure if the title is saying what I am about to ask. My teacher talks about header files jus...
[2 replies] Last: This isn't how headers works. #include is a preprocessor directive w... (by MiiNiPaa)
Virtual classes / functions
In a header file: class GenericClass { public: virtual int doit(int* array, int sizeOfA...
[5 replies] Last: No. Generally, the way it works is that polymorphic classes store poin... (by LB)
by umera
C++ program to convert normal text to mobile text
can sumone help me with a program that reads in a normal text file and converts it into mobile phon...
[5 replies] Last: I am talking about noisedisruption.txt. you have no error checking fo... (by writetonsharma)
help please
Area of the room Your task is to write a program that will find the area of room in a given square...
[8 replies] Last: They should say: "Reported by [insert name here]" (by Script Coder)
Noobie at Coding
Task: Write a function: - exp(x,y): - where x is positive (possibly a decimal) and y is a positive...
[3 replies] Last: If you don't know what it does, then why did you write it? ;) (by LB)
kindly Remove this 1 simple error
Gives Error: string undeclared identifier in void setName (string first, string last); #ifndef per...
[2 replies] Last: Thanks abhishekm. (by Rehan FASTian)
by cerlmc
Help with simple if else statements
I'm doing a project for school pretty simple but I must be over looking something because when i wro...
[1 reply] : Have you tried outputting compensationBonus after you calculate it? ... (by LB)
Save to File problem
I have a project that is suppose to take data for employees, put them into vectors, then allows the ...
[1 reply] : I was able to get it to work. (by crimsonzero2)
Trying to do a homework assignment for a class and cannot figure out how to read a file into an arra...
[3 replies] Last: You probably shouldn't use vectors, then. The logic is still the same,... (by LB)
by rgork
How can I return a value from a pointer?
Probably unclear title, but I'll try to explain better. Here is what's up: struct Square {int...
[1 reply] : The way you're trying to dereference " myclass " is actually the synta... (by closed account zb0S216C)
Array of structs w/constructor
I can't seem to remember everything I should about constructors. I'm looking for a way to create an ...
[2 replies] Last: Yep. Worked like a charm. Thanks. (by codedope)
Write the function void readTestScores (double &exam, double &tavge) that does the following: - pri...
[no replies]
by ibilal
Mid of stack using LinkedList
Hi all, I am unable to make any logical algorithm to access middle of stack. Please guide some wi...
[6 replies] Last: It is strange enough but std::stack has no constructor with initialize... (by vlad from moscow)
April 2013 Pages: 1... 4950515253
  Archived months: [mar2013] [may2013]

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