Beginners - July 2013 (Page 12)

Export data in columns in a dat format
 
Hello guys, I want to export data (X,U) in a .dat format to open it by Tecplot. I need something like this. VARIABLES = "X", "U" ZONE I=2, F=POINT 1,77...
[1 reply] : this will only work if X is an array of objects of some class you de... (by Rechard3)
template with containers
 
I want to write a function template that will generalize the following boolean function to any container of any class. bool isOfCertainGroup (string personN...
[3 replies] Last: You no need to write such a function because there is already such fun... (by vlad from moscow)
by srif
1 time doing loop, Computer guesses my number)
 
I've been scratching my head at this one and can't figure out how to get the do to be declared. If any one can give me an example on how to get the do to "do it...
[2 replies] Last: that wont compile at all edit: ops, i havent looked at yours smac (by closed account Dy7SLyTq)
by nmn
operator[] and assignment help !
 
I am stuck...been at this for hours. I overload the and << operators. class IntArray; int * arrayPtr; so... IntArray obj1; // arrayPtr now points to...
[2 replies] Last: Sorry...i am a 3 weeks old C++ programmer ! still trying to figure out... (by nmn)
Sweet Trick for Beginners
 
This is something I learned at school from my professor which is so awesome I just had to share it with people. So if you are using Visual Studio and find it te...
[2 replies] Last: Cool! Thanks for sharing it with us! I do agree with Disch: If you ... (by closed account jwkNwA7f)
Use a looping structure to create C++ program that outputs 10 9 8 7 6 5 4 3 2 1 Blast off!
 
I'm having a hard figuring an assignment out. I'm very new to C++, so any help would be appreciated. I'm supposed to use a looping structure(for, do while, whil...
[4 replies] Last: Thanks for the help guys. I appreciate it.. (by Blackhole)
Using ("cls");
 
I have recently heard that is not a good idea to use: system("cls"); Why is is not a good idea? And what is a good alternate? Thank you!
[2 replies] Last: Thank you! I will start using this instead. (by closed account jwkNwA7f)
What is the difference between variables declared in the header file vs variable declared in the source file
 
Hi, Two quick questions. 1- What would be difference between the folloing varable declarations? 2- Are both of these variables considered global variab...
[7 replies] Last: The only reason I wan to avoid using global variables is because I ha... (by MikeyBoy)
Writing my own strstr function that finds multiple matches
 
Hello. I am trying to write my own version of the strstr() function that can find multiple matches. The function should return the number of matches found, and ...
[2 replies] Last: Ah, I see. I tried initializing stringtable a few ways, but never exac... (by dawtsf1187)
Help with printing a square..
 
I need to print this square: 1**** 12*** 123** 1234* 12345 But my output turned to: ***** 1**** 12*** 123** 1234* Here's my code so far: int main() { ...
[1 reply] : while( count < size) (by Smac89)
by JB2005
getting Segmentation error working with arrays
 
I'm trying to have this pull numbers from a file put them in an array and then read out the smallest number. Right now it compiles but it prints out "Segmentati...
[3 replies] Last: Okay thank you very much. (by JB2005)
by l0311
help randomizing an array c++
 
Hi, i need help in making a 3x3 grid with the numbers 1-9 and they need to be in a random order without any repeating numbers. so far i have been able to ma...
[7 replies] Last: const int ARRAY_SIZE = 9; srand(time(0)); string numbers = {... (by l0311)
Instances with global scope in a class
 
Hi, Silly question, I thought I knew about this already until last night when I tried to do something and realized that I wasn’t sure about the proper way ...
[8 replies] Last: Furthermore... if you have a pointer in a class... the compiler provi... (by MikeyBoy)
executing a string
 
Is their a method for meta programming in c++? If there is not a direct method to allow the execution of a string, is there a way around it? sort of: std::str...
[1 reply] : Meta programming in C+ is being done with templates or constexpr funct... (by vlad from moscow)
by ar2007
test class with array dynamic memory
 
hello. I'm testing the "classes" and I tried to insert an array in the following exercise, a variant of the example proposed by the tutorial. The program is r...
[2 replies] Last: thanks vlad. you're right. :) (by ar2007)
Nested While HELP!
 
The code only executes the nested while once.. why?? int main() { int base, expo, power; while (base!=0 && expo!=0) { count = 0; cout<<"Enter Base: "; ...
[3 replies] Last: Tnx Guys, got my code to work.. sorry for the Cross Post, newbie her... (by renzboi21)
an epic.
 
Okay, so this is a lot, i know. Thank you * million, in advance! I'm going to post all three parts of the code (a header and two .cpp). I'm writing a banking...
[2 replies] Last: Can you repost the code a little cleaner by using the scource code for... (by Hertz)
by nmn
object assignment question
 
In an assignment like this. a = b; // same type with array as member. if object a array is smaller than object b array. Should it error ?
[6 replies] Last: @nmn In an assignment like this. a = b; // same type with array as... (by vlad from moscow)
String char
 
How can i get user to type a sentence for ex #include <iostream> using namespace std; int main() { int char = 'c'; return 0; } like u can do that...
[6 replies] Last: Hey Techno01. Can you explain the differences between all of those? Wh... (by Shade Tree Programmer)
by bebarb
Getting a function to return an element of an array
 
Hello again all! I'm having a bit of an issue trying to get a function to return which element in a an array I'm passing to the function is lowest or highest...
[15 replies] Last: I had to leave my house and head back to work so I won't be able to tr... (by bebarb)
July 2013 Pages: 1... 1011121314... 53
  Archived months: [jun2013] [aug2013]

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