Beginners - May 2011 (Page 22)

by tagir
c++program (code only)
 
a program that adds the following numbers 5+10+15+20+25.....+n 5+10=15 5+10+15=25
[3 replies] Last: #include <iostream> using namespace std; int add_by5(int num); int m... (by hackthisred)
24-HR to AM/PM converter (call by reference code). Why wont my code work ??
 
So here is the code, I seriously don't understand why its not working... #include<iostream> using namespace std; void inp(int&,int&); void conv(int&,int&,c...
[2 replies] Last: Hahaha wow. Thank you :)...Final exams around the corner and I've been... (by BlueTea)
Substrings
 
Hi in the example from the website it shows you have to go from "live" to the end of the string. I was wondering how you would go from the beginning of the stri...
[3 replies] Last: yes, you would need to know the position of "we" and you could then go... (by ascii)
by pekde
Return array of structures from a function
 
First, I learned to return just a basic struct from a function, like this: #include <iostream> #include <string> using namespace std; struct Numbers ...
[4 replies] Last: since all that arrays really are are pointers, if you pass them to a f... (by ascii)
by Cucus
Different variables for same class
 
Hi, I want to create 7 objects of the same class but in each class, I need to have an array with a unique name for each object. Is there a way to make thi...
[6 replies] Last: I'm not sure if I'm understanding you correctly but if I am I have thi... (by Computergeek01)
Storing Doubles in Memory
 
How can I do this? void Object::SetValues(double Count ...) { va_list values; this->NumberOfValues=Count; va_start(values,Count); for...
[2 replies] Last: Just to clarify, if you were thinking Count had to be the same type ... (by anonymous23323124)
Question about classes (Need a quick response, please).
 
I just thought of something about classes when I looked back on working with them. Can the private data members in a class be left uninitialized when the def...
[4 replies] Last: header file: class C{ private: int i;//private member public: ... (by Moschops)
how i use string
 
how i can use string here ? char fullname ; cout<<"\nEnter your <full name>:"; cin>>fullname; when i leave space between my name it break the progra...
[8 replies] Last: thank you :) (by malikrgc)
Dictionary in c++
 
I want to make Dictionary in c++. give me hint how i do it.
[5 replies] Last: Do you mean a dictionary for looking up words in, or do you mean an "a... (by Moschops)
Oriented Object's question
 
Hi. I1m studying C++'s oriented object, and so, I have one question. I have this code: #include <iostream> using namespace std; class plusNumber { ...
[1 reply] : rect is the name of the plusNumber object. Here is an int called x - ... (by Moschops)
No Output to the Screen
 
Someone please help me figure out why this code isn't producing any screen output. I've been racking my brain all weekend and my solutions looks like the consol...
[3 replies] Last: With the code I posted, and this as data_file.txt "2011-02-27",20:00... (by Moschops)
Using a Class Method in Main
 
When I try: MathFunctions::IntegrateRK(Object1, Object2, int) I get: Error: a nonstatic member reference must be relative to a specific object I can...
[no replies]
Code bloats cause by template
 
On some platform, int* and double* and other T* type share the same object code Some linkers would kill the redundancy part for us, some may not Is most of ...
[5 replies] Last: So the point to discern what may generate the same object code is base... (by stereoMatching)
Why the sequence isn't random?
 
Hi, I have a function gen_graph() which calls the rand() function to generate number sequence and output the sequence into a file, and my main function has suc...
[2 replies] Last: the code of gen_graph is as following: size_t gen_edge( size_t &row, ... (by akilguo)
by firix
visual studio 2010 error
 
I am using visual studio 2010. and get the following error. now I can not compile the program I wrote. Error :The expression "[System.IO.Path]::Combine(...
[4 replies] Last: Hi firix. You could try "clean" in the "build" menu. and then rebuild... (by firix)
What is wrong with this code of C++?
 
The following code is giving run-time error when I change only the place of one line of code. Actually this is no program or snippet, I am just trying to get co...
[3 replies] Last: Hi, The reason why you get run-time error is, you are changing ... (by bandit)
Its been a long time need some help
 
Hi all, It has been 6 years since I have done any real programming at all, and I have lost most of my skill and lost my syntax and just plain old suck now. Th...
[2 replies] Last: Thank You :-) (by anewcreation84)
Search in a string and go to next one.
 
How do i repeat in string find? For example #include <iostream> #include <string> using namespace std; int main () { string textout; size_t pos; stri...
[1 reply] : There is another way to call find, in which you tell it where in the s... (by Moschops)
by nand
Member of class A calling member of class B
 
Hello, I know this may be a dumb question, I've searched in google and forums with no luck. Please help me get this code to work: I want to call a member ...
[3 replies] Last: Thank you all for your replyes, this works: #include <iostream> usin... (by nand)
by snakec
c++ programming problem1
 
Hi! I'm quite new to c++ i write a code for c ++ constructor.I just want to use two constructor . and see the difference the code is following code: #includ...
[2 replies] Last: This uncle u,v; must be uncle *u,*v; // Note that '*' (pointers) t... (by coder777)
May 2011 Pages: 1... 2021222324... 48
  Archived months: [apr2011] [jun2011]

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