User Profile
Collapse
-
ok Thank you very much -
Wait so with those changes, if you inputted 3 it would output:
123
213
312
and so on?
I know they program can compile without any errors, but when it runs I'm fairly confident its getting a segmentation fault or something like that because it just crashes (my compiler doesn't tell me)Leave a comment:
-
First off, very nice article I wish I knew about that when I was learning multidimensiona l arrays. Secondly, I'm getting confused because I'm new to programming and very new to using recursion. I'm trying to make variables to do what you suggested and I can't because I'm having trouble tracking what my code is doing. Right now I gave my array constant values, but I don't think that works do to the nature of my program. If I have: (using a list of...Leave a comment:
-
So you're saying that I should make all the arrays like this?
Also, do you want me to post my intListType class or the constructor for it?Code:intListType array = new intListType[amount];
Leave a comment:
-
array[].copyTo(&answer[]);<----the arrays are empty because I don't know what to put in them to get it to work properlyLeave a comment:
-
Find all Permutations of a list
I need to find all the possible permutations of a list and I am completely stumped. The specification for the function is:
where *toOrigList is a pointer to a list and *answer is an array of lists. intListType has several member functions and I will post them if you want them, but for the most part they are barely used in this function (which is not a member...Code:void allPerms(intListType *toOrigList, intListType *answer)
-
Never mind I'm an idiot. I read right over that. Thank you very much.Leave a comment:
-
-
Trouble sorting an array
My program is supposed to create a matrix and add edges and vertices to the matrix, but I have one function, degreeSequence( ), that takes the array sequence and is supposed to output the degree sequence of the matrix. However, when my function goes to sort it and output it, it turns all the values that are supposed to be 2 into 55. Can anyone help?
...Code:int* graphType::degreeSequence() //Function: returns array of integers
-
Never mind. I got what you were saying. Thank you so much for your time!Leave a comment:
-
I don't completely understand what you are telling me to do. I'm sorry, I'm really new to programmingLeave a comment:
-
Ok so I remade the project with the same code just to see if anything got messed while I was making it and now I'm getting a different error message: "In function 'int main()': (line 17) error: cannot call member function 'void FractionType::I nitialize(int, int)' without object"
Any idea what to do about that?
Thank you for trying to help me.Leave a comment:
-
I thought so too, but when I go into "Project/Target Options" and under "Type" is says "Console". I changed it to WinMain() just to try but I got the same error.Leave a comment:
-
What do I do when I get the error, "undefined reference to WinMain@16"
Hi everyone,
I'm new to programming with C++ and I'm using Code::Blocks as my compiler. I keep getting the error "undefined reference to WinMain@16" and I have no idea how to fix it. My code is supposed to do different things with fractions, but anyway here is my code:(all code is in a project)
myFracDr.cpp
...Code:#include "frac.h" #include "gcd.h" #include <iostream>
No activity results to display
Show More
Leave a comment: